@@ -17,10 +17,12 @@ static void walk_cluster_recursive(const RRGraphView& rr_graph,
17
17
std::unordered_map<RRNodeId, std::unordered_set<RRNodeId>>& sink_ipins,
18
18
RRNodeId curr,
19
19
RRNodeId origin) {
20
- // Check that curr is SINK in the same cluster as origin
20
+ // Make sure SINK in the same cluster as origin. This might not be the case when we have direct-connect between blocks
21
21
int curr_x = rr_graph.node_xlow (curr);
22
22
int curr_y = rr_graph.node_ylow (curr);
23
- VTR_ASSERT_SAFE (!((curr_x < rr_graph.node_xlow (origin)) || (curr_x > rr_graph.node_xhigh (origin)) || (curr_y < rr_graph.node_ylow (origin)) || (curr_y > rr_graph.node_yhigh (origin))));
23
+ if ((curr_x < rr_graph.node_xlow (origin)) || (curr_x > rr_graph.node_xhigh (origin)) || (curr_y < rr_graph.node_ylow (origin)) || (curr_y > rr_graph.node_yhigh (origin)))
24
+ return ;
25
+
24
26
VTR_ASSERT_SAFE (rr_graph.node_type (origin) == e_rr_type::SINK);
25
27
26
28
// We want to go "backward" to the cluster IPINs connected to the origin node
@@ -174,16 +176,16 @@ void set_sink_locs(const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder
174
176
walk_cluster_recursive (rr_graph, node_fanins, sink_ipins, node_id, node_id);
175
177
}
176
178
177
- // Set SINK locations based on "cluster-edge" OPINs and IPINs
179
+ // Set SINK locations based on "cluster-edge" IPINs
178
180
for (const auto & node_pins : sink_ipins) {
179
181
const auto & pin_set = node_pins.second ;
180
182
181
183
if (pin_set.empty ())
182
184
continue ;
183
185
184
186
// Use float so that we can take average later
185
- std::vector<float > x_coords (pin_set. size ()) ;
186
- std::vector<float > y_coords (pin_set. size ()) ;
187
+ std::vector<float > x_coords;
188
+ std::vector<float > y_coords;
187
189
188
190
// Add coordinates of each "cluster-edge" pin to vectors
189
191
for (const auto & pin : pin_set) {
0 commit comments