Skip to content

Commit bdfec62

Browse files
initialize acc_cost for rr nodes on all layers
1 parent 80a85af commit bdfec62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vpr/src/route/route_common.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,15 +430,17 @@ static float comp_initial_acc_cost(RRNodeId node_id, const t_router_opts& route_
430430

431431
if (rr_type == e_rr_type::CHANX) {
432432
int y = rr_graph.node_ylow(node_id);
433+
int layer = rr_graph.node_layer(node_id);
433434
for (int x = rr_graph.node_xlow(node_id); x <= rr_graph.node_xhigh(node_id); x++) {
434-
max_util = std::max(max_util, route_ctx.chanx_util[0][x][y]);
435+
max_util = std::max(max_util, route_ctx.chanx_util[layer][x][y]);
435436
}
436437

437438
} else {
438439
VTR_ASSERT_SAFE(rr_type == e_rr_type::CHANY);
439440
int x = rr_graph.node_xlow(node_id);
441+
int layer = rr_graph.node_layer(node_id);
440442
for (int y = rr_graph.node_ylow(node_id); y <= rr_graph.node_yhigh(node_id); y++) {
441-
max_util = std::max(max_util, route_ctx.chany_util[0][x][y]);
443+
max_util = std::max(max_util, route_ctx.chany_util[layer][x][y]);
442444
}
443445
}
444446

0 commit comments

Comments
 (0)