-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] VIB Upgrades for Tileable Routing Resource Graph on OpenFPGA #2637
Changes from 75 commits
b49f82f
7cdb3f7
c8d6be8
f328220
8a83ee9
5e23e1b
063a13d
48df84d
9e11eb8
9c6fc7a
b7c24d6
e9e7bfe
260572e
ce1b3b4
dc6aa86
6a1f9f8
0d9e9fd
042bef4
77f802e
ba5cd69
7ffd299
155716f
7bd0433
a0ecbce
16ab238
35cccdc
7af8feb
56a7e68
98e7992
5b32f84
87d4b59
c23795c
873469f
307fb0b
77dfbe9
55c4835
82151d4
fffdc02
71c60e2
14eedda
ac8c197
ed15d8a
e508528
08268fe
6abd0b7
f80e4c3
92fd5af
faf2ef3
601718a
0541865
a2777e6
58dce81
5bb56c7
0929cd0
6121423
1d0be82
e904c86
25b096d
03556c6
75e8676
0f81e94
9e0ae28
b65a8e2
abaec29
e6b7e7d
30dae5a
cc8816a
70e4f5a
cabf2ea
0ead1a8
07627be
efb99fc
510f4e2
993aca5
68e4d65
1afa2f5
f3deaa6
ccb5b56
3769b62
9e521a0
cb22a8a
487ed26
6382aaf
bb2d5cf
b3bb7c8
5b27ab8
345a27c
eeb448a
0d7cacd
6f773cd
f7427aa
d91bd9f
ce412a4
d0f19a0
f117218
0e0c9af
9b8a3f2
ca9e9f1
3f5633b
317e2fe
4b91e02
0f34455
3937e3c
3a3f24e
a757254
b447186
35b4200
d5d2372
8afea46
1d45f3b
e8c88fa
7c6d85c
6075e31
3941eef
6be2c9a
391d044
6f681c2
463bdd0
6359b5c
c0a2736
52edaf9
60bc5a0
b9d587e
5ad2329
cbcdf0e
84faf43
4e046ef
60bee8f
0b4cfc2
a182a76
6343061
3bb9068
be709d2
d7d93c9
91960e2
729ae80
7a0dfbc
2e50bfb
9dac8c4
a4479e5
9ae8a99
230fe0f
1678907
cfe7c2a
35a82e7
e2fff38
8dae0c3
481efce
9240ab6
b96878a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -373,6 +373,32 @@ struct t_grid_loc_def { | |
// that come from a common definition. | ||
}; | ||
|
||
struct t_vib_grid_loc_def { | ||
t_vib_grid_loc_def(std::string block_type_val, int priority_val) | ||
: block_type(block_type_val) | ||
, priority(priority_val) | ||
, x("0", "W-1", "max(w+1,W)", "w") //Fill in x direction, no repeat, incr by block width | ||
, y("0", "H-1", "max(h+1,H)", "h") //Fill in y direction, no repeat, incr by block height | ||
{} | ||
|
||
std::string block_type; //The block type name | ||
|
||
int priority = 0; //Priority of the specification. | ||
// In case of conflicting specifications | ||
// the largest priority wins. | ||
|
||
t_grid_loc_spec x; //Horizontal location specification | ||
t_grid_loc_spec y; //Veritcal location specification | ||
|
||
// When 1 metadata tag is split among multiple t_grid_loc_def, one | ||
// t_grid_loc_def is arbitrarily chosen to own the metadata, and the other | ||
// t_grid_loc_def point to the owned version. | ||
std::unique_ptr<t_metadata_dict> owned_meta; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the metadata is not used for now, we do not need to include them in the VIB data structure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will decouple t_grid_loc_spec and enum GridDefType and move all VIB-related data structures to the vib_inf.[h|cpp] |
||
t_metadata_dict* meta = nullptr; // Metadata for this location definition. This | ||
// metadata may be shared with multiple grid_locs | ||
// that come from a common definition. | ||
}; | ||
|
||
enum GridDefType { | ||
AUTO, | ||
FIXED | ||
|
@@ -382,6 +408,10 @@ struct t_layer_def { | |
std::vector<t_grid_loc_def> loc_defs; //The list of block location definitions for this layer specification | ||
}; | ||
|
||
struct t_vib_layer_def { | ||
std::vector<t_vib_grid_loc_def> loc_defs; //The list of block location definitions for this layer specification | ||
}; | ||
|
||
struct t_grid_def { | ||
GridDefType grid_type = GridDefType::AUTO; //The type of this grid specification | ||
|
||
|
@@ -395,6 +425,19 @@ struct t_grid_def { | |
std::vector<t_layer_def> layers; | ||
}; | ||
|
||
struct t_vib_grid_def { | ||
GridDefType grid_type = GridDefType::AUTO; //The type of this grid specification | ||
|
||
std::string name = ""; //The name of this device | ||
|
||
int width = -1; //Fixed device width (only valid for grid_type == FIXED) | ||
int height = -1; //Fixed device height (only valid for grid_type == FIXED) | ||
|
||
float aspect_ratio = 1.; //Aspect ratio for auto-sized devices (only valid for | ||
//grid_type == AUTO) | ||
std::vector<t_vib_layer_def> layers; | ||
}; | ||
|
||
/************************* POWER ***********************************/ | ||
|
||
/* Global clock architecture */ | ||
|
@@ -1613,6 +1656,9 @@ struct t_segment_inf { | |
enum e_parallel_axis parallel_axis; | ||
std::vector<bool> cb; | ||
std::vector<bool> sb; | ||
bool isbend; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest to add code comments to explain each new element, especially for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will add code comments to explain this part. |
||
std::vector<int> bend; | ||
std::vector<int> part_len; | ||
int seg_index; | ||
enum SegResType res_type = SegResType::GENERAL; | ||
//float Cmetal_per_m; /* Wire capacitance (per meter) */ | ||
|
@@ -1998,6 +2044,47 @@ struct t_noc_inf { | |
std::string noc_router_tile_name; | ||
}; | ||
|
||
/* for vib tag */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see very tight correlations among the data structures, |
||
struct t_seg_group { | ||
std::string name; | ||
int seg_index; | ||
int track_num; | ||
}; | ||
|
||
enum e_multistage_mux_from_or_to_type { | ||
PB = 0, | ||
SEGMENT, | ||
MUX | ||
}; | ||
|
||
struct t_from_or_to_inf { | ||
std::string type_name; | ||
e_multistage_mux_from_or_to_type from_type; //from_or_to_type | ||
int type_index = -1; | ||
int phy_pin_index = -1; | ||
char seg_dir = ' '; | ||
int seg_index = -1; | ||
}; | ||
|
||
struct t_first_stage_mux_inf { | ||
std::string mux_name; | ||
std::vector<t_from_or_to_inf> froms; | ||
}; | ||
|
||
struct t_second_stage_mux_inf : t_first_stage_mux_inf { | ||
std::vector<t_from_or_to_inf> to; // for io type, port[pin] may map to several sinks | ||
}; | ||
|
||
struct t_vib_inf { | ||
std::string name; /* vib name */ | ||
std::string pbtype_name; /* pbtype name of vib */ | ||
int seg_group_num; /* seg group number of vib */ | ||
int switch_idx; /* vib switch index */ | ||
std::vector<t_seg_group> seg_groups; | ||
std::vector<t_first_stage_mux_inf> first_stages; | ||
std::vector<t_second_stage_mux_inf> second_stages; | ||
}; | ||
|
||
/* Detailed routing architecture */ | ||
struct t_arch { | ||
/** Stores unique strings used as key and values in <metadata> tags, | ||
|
@@ -2075,10 +2162,16 @@ struct t_arch { | |
|
||
std::vector<t_grid_def> grid_layouts; //Set of potential device layouts | ||
|
||
std::vector<t_vib_grid_def> vib_grid_layouts; | ||
|
||
t_clock_arch_spec clock_arch; // Clock related data types | ||
|
||
// if we have an embedded NoC in the architecture, then we store it here | ||
t_noc_inf* noc = nullptr; | ||
|
||
// added for vib | ||
bool is_vib_arch = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The boolean variable may not be necessary. Can we use the |
||
std::vector<t_vib_inf> vib_infs; | ||
}; | ||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove VIB-related data structure to a new class.