File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -574,8 +574,10 @@ static void build_rr_graph(const t_graph_type graph_type,
574
574
575
575
device_ctx.rr_node_indices = alloc_and_load_rr_node_indices (max_chan_width, grid,
576
576
&num_rr_nodes, chan_details_x, chan_details_y);
577
+ size_t expected_node_count = num_rr_nodes;
577
578
if (clock_modeling == DEDICATED_NETWORK) {
578
- device_ctx.rr_nodes .reserve (num_rr_nodes + ClockRRGraphBuilder::estimate_additional_nodes (grid));
579
+ expected_node_count += ClockRRGraphBuilder::estimate_additional_nodes (grid);
580
+ device_ctx.rr_nodes .reserve (expected_node_count);
579
581
}
580
582
device_ctx.rr_nodes .resize (num_rr_nodes);
581
583
@@ -692,6 +694,12 @@ static void build_rr_graph(const t_graph_type graph_type,
692
694
is_global_graph,
693
695
clock_modeling);
694
696
697
+ // Verify no incremental node allocation.
698
+ if (device_ctx.rr_nodes .size () > expected_node_count) {
699
+ VTR_LOG_ERROR (" Expected no more than %zu nodes, have %zu nodes" ,
700
+ expected_node_count, device_ctx.rr_nodes .size ());
701
+ }
702
+
695
703
/* Update rr_nodes capacities if global routing */
696
704
if (graph_type == GRAPH_GLOBAL) {
697
705
// Using num_rr_nodes here over device_ctx.rr_nodes.size() because
You can’t perform that action at this time.
0 commit comments