Skip to content

Commit d7d189b

Browse files
add comment to comp_initial_acc_cost()
1 parent 9a1ef9d commit d7d189b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vpr/src/route/route_common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,16 @@ static float comp_initial_acc_cost(RRNodeId node_id,
434434
const auto& route_ctx = g_vpr_ctx.routing();
435435
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
436436

437+
// The default acc_cost is 1 for all rr_nodes. For routing wires, if they pass through a channel
438+
// with expected utilization above the threshold, we assign a higher initial cost.
439+
// This helps the router avoid channels that are likely to be congested.
437440
float cost = 1.f;
438441

439442
const e_rr_type rr_type = rr_graph.node_type(node_id);
440443
const double threshold = route_opts.initial_acc_cost_chan_congestion_threshold;
441444
const double weight = route_opts.initial_acc_cost_chan_congestion_weight;
442445

446+
// TODO: We don't have an explicit CHANZ type. These wires are marked as CHANX. This should be fixed.
443447
if (is_chan(rr_type) && !route_ctx.chanx_util.empty()) {
444448
VTR_ASSERT_SAFE(!route_ctx.chany_util.empty());
445449
double max_util = 0.;

0 commit comments

Comments
 (0)