51
51
* side: The side of a grid location where an IPIN or OPIN is located. *
52
52
* This field is valid only for IPINs and OPINs and should be ignored *
53
53
* otherwise. */
54
- struct alignas (32 ) t_rr_node_data {
54
+ struct alignas (16 ) t_rr_node_data {
55
55
int16_t cost_index_ = -1 ;
56
56
int16_t rc_index_ = -1 ;
57
57
@@ -60,9 +60,6 @@ struct alignas(32) t_rr_node_data {
60
60
int16_t xhigh_ = -1 ;
61
61
int16_t yhigh_ = -1 ;
62
62
63
- int16_t node_bend_start_ = 0 ;
64
- int16_t node_bend_end_ = 0 ;
65
-
66
63
e_rr_type type_ = e_rr_type::NUM_RR_TYPES;
67
64
68
65
/* The character is a hex number which is a 4-bit truth table for node sides
@@ -86,8 +83,8 @@ struct alignas(32) t_rr_node_data {
86
83
// t_rr_node_data is a key data structure, so fail at compile time if the
87
84
// structure gets bigger than expected (16 bytes right now). Developers
88
85
// should only expand it after careful consideration and measurement.
89
- static_assert (sizeof (t_rr_node_data) == 32 , "Check t_rr_node_data size");
90
- static_assert (alignof (t_rr_node_data) == 32 , "Check t_rr_node_data size");
86
+ static_assert (sizeof (t_rr_node_data) == 16 , "Check t_rr_node_data size");
87
+ static_assert (alignof (t_rr_node_data) == 16 , "Check t_rr_node_data size");
91
88
92
89
/* t_rr_node_ptc_data is cold data is therefore kept seperate from
93
90
* t_rr_node_data.
@@ -188,10 +185,10 @@ class t_rr_graph_storage {
188
185
}
189
186
190
187
short node_bend_start (RRNodeId id) const {
191
- return node_storage_ [id]. node_bend_start_ ;
188
+ return node_bend_start_ [id];
192
189
}
193
190
short node_bend_end (RRNodeId id) const {
194
- return node_storage_ [id]. node_bend_end_ ;
191
+ return node_bend_end_ [id];
195
192
}
196
193
197
194
short node_capacity (RRNodeId id) const {
@@ -932,6 +929,14 @@ class t_rr_graph_storage {
932
929
*/
933
930
vtr::vector<RREdgeId, bool > edge_remapped_;
934
931
932
+ /* * @brief
933
+ * Bend start and end are used to store the bend information for each node.
934
+ * Bend start and end are only used for CHANX and CHANY nodes.
935
+ * Bend start and end are only used for tileable routing resource graph.
936
+ */
937
+ vtr::vector<RRNodeId, int16_t > node_bend_start_;
938
+ vtr::vector<RRNodeId, int16_t > node_bend_end_;
939
+
935
940
/* **************
936
941
* State flags *
937
942
***************/
@@ -986,7 +991,9 @@ class t_rr_graph_view {
986
991
const vtr::array_view_id<RREdgeId, const RRNodeId> edge_src_node,
987
992
const vtr::array_view_id<RREdgeId, const RRNodeId> edge_dest_node,
988
993
const vtr::array_view_id<RREdgeId, const short > edge_switch,
989
- const std::unordered_map<std::string, RRNodeId>& virtual_clock_network_root_idx)
994
+ const std::unordered_map<std::string, RRNodeId>& virtual_clock_network_root_idx,
995
+ const vtr::array_view_id<RRNodeId, const int16_t > node_bend_start,
996
+ const vtr::array_view_id<RRNodeId, const int16_t > node_bend_end)
990
997
: node_storage_(node_storage)
991
998
, node_ptc_(node_ptc)
992
999
, node_first_edge_(node_first_edge)
@@ -997,7 +1004,9 @@ class t_rr_graph_view {
997
1004
, edge_src_node_(edge_src_node)
998
1005
, edge_dest_node_(edge_dest_node)
999
1006
, edge_switch_(edge_switch)
1000
- , virtual_clock_network_root_idx_(virtual_clock_network_root_idx) {}
1007
+ , virtual_clock_network_root_idx_(virtual_clock_network_root_idx)
1008
+ , node_bend_start_(node_bend_start)
1009
+ , node_bend_end_(node_bend_end) {}
1001
1010
1002
1011
/* ***************
1003
1012
* Node methods *
@@ -1218,4 +1227,7 @@ class t_rr_graph_view {
1218
1227
vtr::array_view_id<RREdgeId, const short > edge_switch_;
1219
1228
const std::unordered_map<std::string, RRNodeId>& virtual_clock_network_root_idx_;
1220
1229
1230
+ vtr::array_view_id<RRNodeId, const int16_t > node_bend_start_;
1231
+ vtr::array_view_id<RRNodeId, const int16_t > node_bend_end_;
1232
+
1221
1233
};
0 commit comments