Skip to content

Commit ccf667b

Browse files
initialize the cost index of CHANZ nodes based on the segment type they drie
1 parent 21e7287 commit ccf667b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/route/rr_graph_generation/rr_graph_3d.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ void build_inter_die_3d_rr_chan(RRGraphBuilder& rr_graph_builder,
6666
// Try to find a node with the current track_num
6767

6868
const t_bottleneck_link& link = interdie_3d_links[track_num];
69+
VTR_ASSERT_SAFE(link.chan_type == e_rr_type::CHANZ);
6970
const char layer_low = std::min(link.gather_loc.layer_num, link.scatter_loc.layer_num);
7071
const char layer_high = std::max(link.gather_loc.layer_num, link.scatter_loc.layer_num);
7172

@@ -82,8 +83,7 @@ void build_inter_die_3d_rr_chan(RRGraphBuilder& rr_graph_builder,
8283

8384
rr_graph_builder.set_node_layer(node, layer_low, layer_high);
8485
rr_graph_builder.set_node_coordinates(node, x_coord, y_coord, x_coord, y_coord);
85-
// TODO: the index doesn't make any sense. We need to an RRIndexedDataId for CHANZ nodes
86-
rr_graph_builder.set_node_cost_index(node, RRIndexedDataId(const_index_offset));
86+
rr_graph_builder.set_node_cost_index(node, RRIndexedDataId(const_index_offset + link.parallel_segment_index));
8787
rr_graph_builder.set_node_capacity(node, 1); // GLOBAL routing handled elsewhere
8888
float R = 0;
8989
float C = 0;

0 commit comments

Comments
 (0)