-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfp.h
More file actions
70 lines (60 loc) · 1.36 KB
/
fp.h
File metadata and controls
70 lines (60 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef __FP_H__
#define __FP_H__
#define MODULE_LIMIT 500
#define OPERATOR_LIMIT 1000
#define NET_LIMIT 500
#define TOTAL_WIDTH 100
#define TOTAL_HEIGHT 100
#define AREA 1
#define RATIO 10
#define SEMI 3
#define PIO 6
extern int TOTAL_MODULES ;
extern int TOTAL_NETS ;
enum read_module_file_state{
module_index = 0,
x_coordinate,
y_coordinate,
x_width,
y_width
};
enum transition_type{
SWAP_OPERATOR = 0,
FLIP ,
SWAP_OPERANT
};
struct module{
int module_index;
int x_coordinate ;
int y_coordinate;
int x_width;
int y_width;
int pio ;
};
typedef struct module MODULE ;
struct net{
int net_index ;
int *module_list ;
int module_count ;
};
typedef struct net NET;
struct fptreenode{
char operator ;
int node_number ;
int width;
int height ;
struct fptreenode * left ;
struct fptreenode * right ;
};
typedef struct fptreenode FPTREE ;
extern FPTREE * solution ;
extern FPTREE * operators[OPERATOR_LIMIT];
extern FPTREE * operants[MODULE_LIMIT];
extern FPTREE * nodes[3 * OPERATOR_LIMIT];
extern MODULE module_arr[MODULE_LIMIT];
extern NET net_arr[NET_LIMIT];
extern FPTREE * iter_construct_tree_H(int i,FPTREE * left, FPTREE * right, MODULE * module_arr);
extern long solution_cost(FPTREE * solution, NET * net_arr, MODULE * module_arr);
extern int transition( NET* net_arr, MODULE * module_arr, int i1);
extern FPTREE * list2tree(FPTREE * nodes[]);
#endif