Repository navigation
Conversation
When the 2D route ends without overflow, FastRoute reroutes in 3D in two passes, edges shorter than 40 gcells and then shorter than 12. With resistance-aware routing on, both thresholds are lifted: both passes rip up every edge of every net with negative slack, and the second only widens the resistance-aware set (30 % of the critical nets to all of them). On a block that routes without overflow that is most of global route: 58.8 of 60.5 s of FastRoute on an asap7 block of 61,321 nets. In the first pass 31,030 of the 37,198 nets ripped up are not resistance-aware (a quarter of the 194 M gcells searched): they are rerouted with the legacy cost on a route with no overflow to relieve. The pass now runs once and on the nets resistance-aware routing selected; without resistance-aware routing it is unchanged. On that block: finalisation 62.1 -> 32.4 s, period at global route 992.1 -> 993.3 ps (+0.12 %); skipping the pass entirely would cost 1,004.2 ps. TestResistanceMode checks that an unselected net routed on M3 keeps its route through the pass, with a control that the same net is rerouted onto M1 when resistance-aware routing is off. The goldens of res_aware_nets_percentage and resistance_aware_asap7_fr are regenerated: wirelength 24,782 -> 24,984 um on the first, TNS -2,619.2 -> -2,626.5 ps with WNS unchanged on the second. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces the 'finalMazeRoute3D' method to handle final 3D maze routing, optimizing the process when resistance-aware routing is enabled by only rerouting selected nets. It also includes comprehensive unit tests and updates to test golden files. The review feedback suggests minor code improvements: using 'std::move' to avoid copying a local vector, explicitly casting a variable to prevent narrowing conversion warnings in tests, and aligning function definition parameter constness with its declaration for consistency.
repair_design6, repair_setup_reroute1 and repair_setup_reroute2 diffed their log against a .ok, so any change in which nets the resistance-aware reroute picks failed them. They now check what the reroute is for: - repair_design6: the design starts with max slew and capacitance violations, repair_design -reroute reroutes nets (RSZ-0044), and no violation remains. - repair_setup_reroute1/2: the design starts with setup violations, repair_timing reroutes nets resistance-aware (RSZ-0053), and WNS and TNS both improve. Controls: without -reroute (repair_design6) or without the repair_timing call (repair_setup_reroute2) the reroute check fails with "Expected 1, got 0". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PFLaDvDKchGAEykuBJfiJ Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
We need to be careful here. I did a similar experiment before. The multiple maze3D calls significantly improve timing QoR on some private designs. Especially when we have many critical nets and not enough resources for everyone on the upper layers. We do a better job when slowly promoting critical nets in multiple steps. I can run some private tests to see the real impact. |
|
@jfgava Thank you for the direction. I'm closing this PR, it sounds like whatever is done, it will be something different than this. |
|
@jfgava confirmed on a small asap7 block (Uncache from XiangShan, 74k cells): global route alone from its CTS result, with 3D pass variants behind a switch. Upper-layer capacity has to be short and many nets critical for the second pass to matter. As the block comes, almost no net has negative slack, so I tightened the clock to 850 ps (S1), then also squeezed M8–M9 to 0.9 adjustment (S2), the most that still routes without 2D overflow.
Period and TNS are deterministic; finalisation is the best of three runs on a shared machine.
Closed stays closed. |
With
-resistance_aware, on an asap7 block that routes without overflow (61,321 nets):Without
-resistance_awarenothing changes.Why
After a 2D route without overflow, FastRoute reroutes in 3D twice, edges under 40 gcells and then under 12. Resistance-aware routing lifts both thresholds, so both passes rip up every edge of every net with negative slack; the second pass only widens the resistance-aware set from 30 % of the critical nets to all of them. On the block above that was 58.8 of FastRoute's 60.5 s, and 31,030 of the 37,198 nets ripped up in the first pass were not resistance-aware: rerouted with the legacy cost on a route with no overflow to relieve.
Change
One commit: with resistance-aware routing on, the final 3D pass runs once, on the nets resistance-aware routing selected (
res_aware_nets_only_inmazeRouteMSMDOrder3D).The result is not identical
It reroutes fewer nets on purpose, so routes and timing move. The question for review is whether +0.12 % period on the block above, inside an opt-in mode, is acceptable for half the finalisation time.
Tests
TestResistanceMode: an unselected net routed on M3 keeps its route through the pass; control: the same net is rerouted onto M1 with resistance-aware routing off.res_aware_nets_percentageandresistance_aware_asap7_frgoldens regenerated: wirelength 24,782 -> 24,984 um on the first; TNS -2,619.2 -> -2,626.5 ps, WNS unchanged, on the second.repair_design6,repair_setup_reroute1andrepair_setup_reroute2(rsz) no longer diff a log: they check that the reroute reroutes nets and fixes the slew and capacitance violations, or improves WNS and TNS. Without the reroute, the reroute check fails.The integration test, with the measurement, is The-OpenROAD-Project/bazel-orfs#1490.
🤖 Generated with Claude Code