RSZ: new resistance-aware move for repairSetup#10337
RSZ: new resistance-aware move for repairSetup#10337openroad-ci wants to merge 69 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…he other moves iterating by gate delay Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…Move Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Code Review
This pull request introduces a resistance-aware rerouting capability to the resizer, allowing for improved timing closure by rerouting nets that exhibit high resistance. The implementation includes a new ResAwareMove class, updates to the GlobalRouter to support resistance-aware routing, and integration into the repair_timing command. My feedback is that the magic number 0.40f used as a threshold for resistance reduction should be replaced with a named constant to improve code maintainability.
| float estimated_resistance | ||
| = resizer_->global_router_->getFRNetResistanceOnMinClockLayer(db_net); | ||
|
|
||
| constexpr float kMinResistanceReduction = 0.40f; |
There was a problem hiding this comment.
The constant 0.40f (kMinResistanceReduction) is a magic number. It would improve maintainability and clarity to define this as a named constant, perhaps in a configuration file or a dedicated constants header, to make its purpose explicit and easily modifiable.
References
- Define tunable parameters as named constants instead of using hardcoded magic numbers.
There was a problem hiding this comment.
I think this could be set with a TCL parameter in the future. The 0.4 value is ok for Rapidus and Asap7, but may not be ideal for other PDKs
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
|
I propose renaming to RerouteMove as a user-friendly name |
Agree, we should rename it. |
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into rsz-res-aware-move
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
|
@povik Eder and Cho also approved your suggestion. So it is now called RerouteMove. I've already made the necessary changes in the code |
|
clang-tidy review says "All clean, LGTM! 👍" |
eder-matheus
left a comment
There was a problem hiding this comment.
Looks good on the GRT side. I'll let @precisionmoon and @povik do the review on the resizer part.
Summary
ResAwareMoveis a new timing repair move type in therszmodule that improves setup timing by selectively rerouting critical nets onto lower-resistance layers via the Global Router (GRT). It integrates withrepair_timing -setupas a first-class optimization move rather than a whole-flow routing mode, and adds a dedicatedRESAWAREphase to the multi-phase repair framework.Changes
OpenROAD
New:
rsz/src/ResAwareMove.cc/ResAwareMove.hhImplements the
ResAwareMoveclass derived fromBaseMove. ThedoMovemethod:GlobalRouter::getFRNetResistance()(current routing resistance from the FastRoute Steiner tree) andGlobalRouter::getFRNetResistanceOnMinClockLayer()(estimated resistance if all wire segments were placed on the minimum clock layer). Rejects the move if the estimated resistance reduction is below a 40% threshold, avoiding unnecessary incremental reroutes.setNetIsResAware), adds it to GRT's dirty-net list, and invalidates its parasitic cache. The physical reroute is deferred to the nextestimate_parasitics_->updateParasitics()call.Modified:
rsz/src/RepairSetup.ccrepairPathResAware: New function that expands a timing path, ranks all driver nodes by descending wire delay, and triesResAwareMoveon each in order, returning after the first accepted move.repairSetup_ResAware: New phase implementation. Iterates over violating endpoints and callsrepairPathResAwarefor each, using the sharedrepairEndpointsloop. Tracks iteration counts and progress identically to the existingLEGACYandLAST_GASPphases.setupMoveSequence: When the explicit sequence containsRES_AWARE,ResAwareMoveis added to the move list only if global routing is present (haveRoutes). In the default (empty) sequence, it is prepended beforeUnbufferMovewhen resistance-aware mode is enabled.RESAWAREis registered as a valid phase name in the phase-iteration loop, alongsideLEGACY,WNS,TNS,ENDPOINT_FANIN,STARTPOINT_FANOUT, andLAST_GASP.ResAwareMove.Modified:
grt/src/GlobalRouter.cpp/ FastRoutegetFRNetResistance(db_net): Returns the current routing resistance of a net computed from the existing FastRoute Steiner tree.getFRNetResistanceOnMinClockLayer(db_net): Estimates resistance assuming all horizontal/vertical wire segments are placed on the minimum clock layer (or minimum routing layer if no clock layer is set), preserving via resistances from actual layer transitions. Uses the existing Steiner topology without triggering a reroute.getNetResistanceOnLayer(db_net, layer)(FastRouteCore): Walks the existing Steiner tree edges and accumulates wire resistance using the specified layer's R/sq values.setNetIsResAware/isNetResAware: Per-net flag in the GRTNetobject controlling whether the net is force-rerouted via the resistance-aware scoring path on the next incremental route.New: Regression Tests (
rsz/test/)repair_setup_res_aware1.tcl: TestsResAwareMoveas the sole move in the sequence (-sequence "res_aware") on ASAP7 GCD.repair_setup_res_aware2.tcl: Tests the dedicatedRESAWAREphase.repair_setup_res_aware3.tcl: TestsResAwareMoveincluded automatically in the default sequence via the-resistance_awareflag..okgolden output files for CMake/Bazel regression.ORFS (
flow/scripts/global_route.tcl)The post-GRT repair_timing call can be used in different ways:
1 - Including the
ResAwareMoveat the start of the default move sequence with the default phases.2 - The
RESAWAREphase runs first to flag high-resistance critical nets for rerouting before conventional sizing and buffering moves.3 - The
RESAWAREphase runs first. Then the convetional phases run with res_aware included in the sequence.Type of Change
Impact
ResAwareMoveintroduces a targeted per-net decision made inside the timing repair loop: only nets where routing on a better layer is estimated to reduce resistance by at least 40% are marked for resistance-aware rerouting.Verification
./etc/Build.sh).