Skip to content

Commit a4e318e

Browse files
explain the logic behind not starting congestion modeling early in the anneal
1 parent e043a1f commit a4e318e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

vpr/src/place/annealer.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,14 +679,18 @@ void PlacementAnnealer::outer_loop_update_timing_info() {
679679
outer_crit_iter_count_++;
680680
}
681681

682-
683682
// Congestion modeling is enabled when the ratio of the current range limit to the initial range limit
684683
// drops below a user-specified threshold, and the congestion cost weighting factor is non-zero.
685684
// Once enabled, congestion modeling continues even if the range limit increases and the ratio
686685
// rises above the threshold.
686+
//
687+
// This logic is motivated by the observation that enabling congestion modeling too early in the
688+
// anneal increases computational overhead and introduces noise into the placement cost function,
689+
// as early placements are typically highly congested and unstable. So, we delay congestion modeling
690+
// until the placement is more settled and wirelength has been reasonably optimized.
687691
if ((annealing_state_.rlim / MoveGenerator::first_rlim < placer_opts_.congestion_rlim_trigger_ratio
688-
&& placer_opts_.congestion_factor != 0.)
689-
|| congestion_modeling_started_) {
692+
&& placer_opts_.congestion_factor != 0.)
693+
|| congestion_modeling_started_) {
690694
costs_.congestion_cost = net_cost_handler_.estimate_routing_chan_util();
691695

692696
if (!congestion_modeling_started_) {

vpr/src/place/net_cost_handler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ std::tuple<double, double, double> NetCostHandler::comp_per_layer_bb_cost_(e_cos
301301
double cost = 0.;
302302
double expected_wirelength = 0.;
303303
// TODO: compute congestion cost
304+
// Congestion modeling is not supported for per-layer mode, so 0 is returned.
304305
constexpr double cong_cost = 0.;
305306

306307
for (ClusterNetId net_id : cluster_ctx.clb_nlist.nets()) {

0 commit comments

Comments
 (0)