From e08471dfaf49c1c0eb0ea53a85db5f42b5833a53 Mon Sep 17 00:00:00 2001 From: gatecat Date: Thu, 24 Aug 2023 08:55:53 +0200 Subject: [PATCH] router2: Improve robustness when critical nets conflict Signed-off-by: gatecat --- common/route/router2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/route/router2.cc b/common/route/router2.cc index a54c58c9..db8885d4 100644 --- a/common/route/router2.cc +++ b/common/route/router2.cc @@ -626,7 +626,7 @@ struct Router2 int dst_wire_idx = wire_to_idx.at(dst_wire); // Calculate a timing weight based on criticality float crit = get_arc_crit(net, i); - float crit_weight = (1.0f - std::pow(crit, 2)); + float crit_weight = std::max(0.05f, (1.0f - std::pow(crit, 2))); ROUTE_LOG_DBG(" crit=%.3f crit_weight=%.3f\n", crit, crit_weight); // Check if arc was already done _in this iteration_ if (t.processed_sinks.count(dst_wire))