VPR-7.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
globals.h
Go to the documentation of this file.
1 /*
2  Global variables
3 
4  Key global variables that are used everywhere in VPR:
5  clb_net, vpack_net, block, and logical_block
6 
7  These variables represent the user netlist in various stages of the CAD flow:
8  vpack_net and logical_block for the unclustered netlist pre packing
9  clb_net and block for the clustered netlist post packing
10  */
11 
12 #ifndef GLOBALS_H
13 #define GLOBALS_H
14 
15 /********************************************************************
16 Checking OS System
17 ********************************************************************/
18 /*#if defined(__WIN32__) || defined(__WIN32) || defined(_WIN32) || defined(WIN32) || defined(__TOS_WIN__) || defined(__WINDOWS__)
19  #ifndef __WIN32__
20  #define __WIN32__
21  #endif
22 #else
23  #ifndef __UNIX__
24  #define __UNIX__
25  #endif
26  #include <sys/time.h>
27 #endif*/
28 
29 /********************************************************************
30  User Netlist Globals
31  ********************************************************************/
32 
33 /* external-to-complex block nets in the user netlist */
34 extern int num_nets;
35 extern struct s_net *clb_net;
36 
37 /* blocks in the user netlist */
38 extern int num_blocks;
39 extern struct s_block *block;
40 
41 /********************************************************************
42  Physical FPGA architecture globals
43  *********************************************************************/
44 
45 /* x and y dimensions of the FPGA itself, the core of the FPGA is from [1..nx][1..ny], the I/Os form a perimeter surrounding the core */
46 extern int nx, ny;
47 extern struct s_grid_tile **grid; /* FPGA complex blocks grid [0..nx+1][0..ny+1] */
48 
49 /* Special pointers to identify special blocks on an FPGA: I/Os, unused, and default */
50 extern t_type_ptr IO_TYPE;
51 extern t_type_ptr EMPTY_TYPE;
52 extern t_type_ptr FILL_TYPE;
53 
54 /* type_descriptors are blocks that can be moved by the placer
55  such as: I/Os, CLBs, memories, multipliers, etc
56  Different types of physical block are contained in type descriptors
57  */
58 extern int num_types;
59 extern struct s_type_descriptor *type_descriptors;
60 
61 /* name of the blif circuit */
62 extern char *blif_circuit_name;
63 /* default output name */
64 extern char *default_output_name;
65 
66 /* Default area of a 1x1 logic tile (excludes routing) on the FPGA */
67 extern float grid_logic_tile_area;
68 
69 /* Area of a mux transistor for the input connection block */
70 extern float ipin_mux_trans_size;
71 
72 /*******************************************************************
73  Packing related globals
74  ********************************************************************/
75 
76 /* Netlist description data structures. */
77 
78 /* User netlist information */
80 extern int num_p_inputs, num_p_outputs;
81 extern struct s_net *vpack_net;
82 extern struct s_logical_block *logical_block;
83 extern struct s_subckt *subckt;
84 
85 /* primiary inputs removed from circuit */
86 extern struct s_linked_vptr *circuit_p_io_removed;
87 
88 /* Relationship between external-to-complex block nets and internal-to-complex block nets */
89 extern int *clb_to_vpack_net_mapping; /* [0..num_clb_nets - 1] */
90 extern int *vpack_to_clb_net_mapping; /* [0..num_vpack_nets - 1] */
91 
92 
93 /*******************************************************************
94  Routing related globals
95  ********************************************************************/
96 
97 /* chan_width_x is the x-directed channel; i.e. between rows */
98 extern int *chan_width_x, *chan_width_y; /* numerical form */
99 
100 /* [0..num_nets-1] of linked list start pointers. Defines the routing. */
101 extern struct s_trace **trace_head, **trace_tail;
102 
103 /* Structures to define the routing architecture of the FPGA. */
104 extern int num_rr_nodes;
105 extern t_rr_node *rr_node; /* [0..num_rr_nodes-1] */
106 extern int num_rr_indexed_data;
107 extern t_rr_indexed_data *rr_indexed_data; /* [0 .. num_rr_indexed_data-1] */
108 extern t_ivec ***rr_node_indices;
109 extern int **net_rr_terminals; /* [0..num_nets-1][0..num_pins-1] */
110 extern struct s_switch_inf *switch_inf; /* [0..det_routing_arch.num_switch-1] */
111 extern int **rr_blk_source; /* [0..num_blocks-1][0..num_class-1] */
112 
113 /* the head pointers of structures that are "freed" and used constantly */
114 /*struct s_heap *g_heap_free_head;
115 struct s_trace *g_trace_free_head;
116 struct s_linked_f_pointer *g_linked_f_pointer_free_head;*/
117 
118 /*******************************************************************
119  Timing related globals
120  ********************************************************************/
121 
122 extern float pb_max_internal_delay; /* biggest internal delay of block */
123 extern const t_pb_type *pbtype_max_internal_delay; /* block type with highest internal delay */
124 
125 /*******************************************************************
126  Clock Network
127  ********************************************************************/
128 extern t_clock_arch * g_clock_arch;
129 
130 #endif
131 
struct s_grid_tile ** grid
Definition: globals.c:59
int * chan_width_y
Definition: globals.c:57
int * chan_width_x
Definition: globals.c:56
struct s_logical_block * logical_block
Definition: globals.c:20
int num_p_inputs
Definition: globals.c:18
struct s_subckt * subckt
struct s_linked_vptr * circuit_p_io_removed
Definition: globals.c:90
int num_rr_indexed_data
Definition: globals.c:73
int * clb_to_vpack_net_mapping
Definition: globals.c:33
const t_pb_type * pbtype_max_internal_delay
Definition: globals.c:94
int num_logical_blocks
Definition: globals.c:17
struct s_net * clb_net
Definition: globals.c:28
struct s_type_descriptor * type_descriptors
Definition: globals.c:38
t_type_ptr FILL_TYPE
Definition: globals.c:42
t_ivec *** rr_node_indices
Definition: globals.c:71
int nx
Definition: globals.c:46
int num_p_outputs
Definition: globals.c:18
int num_types
Definition: globals.c:37
t_rr_node * rr_node
Definition: globals.c:70
struct s_block * block
Definition: globals.c:31
float pb_max_internal_delay
Definition: globals.c:93
int ** rr_blk_source
Definition: globals.c:87
int * vpack_to_clb_net_mapping
Definition: globals.c:34
Definition: util.h:47
int ** net_rr_terminals
Definition: globals.c:78
struct s_switch_inf * switch_inf
Definition: globals.c:83
t_type_ptr EMPTY_TYPE
Definition: globals.c:41
t_rr_indexed_data * rr_indexed_data
Definition: globals.c:74
struct s_trace ** trace_tail
Definition: globals.c:65
int num_blocks
Definition: globals.c:30
char * default_output_name
Definition: globals.c:22
struct s_net * vpack_net
Definition: globals.c:19
float ipin_mux_trans_size
Definition: globals.c:14
t_type_ptr IO_TYPE
Definition: globals.c:40
int num_nets
Definition: globals.c:27
t_clock_arch * g_clock_arch
Definition: globals.c:97
int num_logical_nets
Definition: globals.c:17
int num_rr_nodes
Definition: globals.c:69
char * blif_circuit_name
Definition: globals.c:21
int ny
Definition: globals.c:47
float grid_logic_tile_area
Definition: globals.c:13
struct s_trace ** trace_head
Definition: globals.c:64