Skip to content

rsz: exclude non-timing drivers from GPL slack ranking - #11611

Merged
precisionmoon merged 4 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gpl_rsz_fix_wns_mismatch
Oct 2, 2026
Merged

precisionmoon merged 4 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gpl_rsz_fix_wns_mismatch

Conversation

@eder-matheus

Copy link
Copy Markdown
Member

Summary

Timing-driven global placement weights nets by the slack of their driver pins,
collected in Resizer::findResizeSlacks1(). Two kinds of drivers produced
misleading slacks there:

  • Loadless drivers (no fanout) have no required time, so their slack can be
    worse than any real endpoint. In GPL: Strange behavior when enabling repair_timing during timing-driven #10751, a loadless input reported -0.270 ns
    while the design WNS was -0.028 ns, so GPL-0106 printed -0.270 ns and the net
    weighting was anchored to that value.
  • Unconstrained drivers have infinite slack. They were never weighted, but
    still counted toward -timing_driven_nets_percentage.

This PR skips loadless drivers and excludes nets with infinite slack from the
ranking. GPL-0106 now reports the worst slack of a real timing path, and the
nets percentage applies to constrained nets only.

Type of Change

  • Bug fix

Impact

  • Only timing-driven global placement changes, and only in designs that have
    loadless or unconstrained drivers. Other designs are bit-identical; many
    public designs in CI show exactly zero change.
  • When many nets are unconstrained, fewer nets get weighted than before, because
    the percentage is now taken over constrained nets only.

Verification

  • I have verified that the local build succeeds (built with Bazel, bazel build //:openroad).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

Fixes #10751

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
@eder-matheus eder-matheus self-assigned this Oct 2, 2026
@github-actions github-actions Bot added the size/S label Oct 2, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the resizer to skip loadless drivers and exclude unconstrained nets from slack ranking and weighting by checking for fuzzy infinity. It also adds a C++ unit test to verify this behavior and updates various test expectations accordingly. The review feedback suggests explicitly including sta/Fuzzy.hh in src/rsz/src/Resizer.cc to ensure compilation robustness, as sta::fuzzyInf is now used in that file.

Comment thread src/rsz/src/Resizer.cc
@eder-matheus
eder-matheus marked this pull request as ready for review October 2, 2026 16:19
@eder-matheus
eder-matheus requested review from a team as code owners October 2, 2026 16:19
@eder-matheus

Copy link
Copy Markdown
Member Author

@jhkim-pii @gudeh @precisionmoon Here are some results from public CI:

QoR on 61 public ORFS designs (ORFS master 5105b0a, compared against latest master):

  • Finish TNS: 17 better, 8 worse, 36 within ±5%.
  • Finish WNS: 19 better, 9 worse, 33 within ±0.5% of the clock period.
  • Instance area: essentially unchanged (median 0.00%, range -1.9% to +4.0%).

11 designs fail at least one CI check. Every design whose finish TNS degrades by more than 5% is in that table.

Values are in ns, except asap7 (ps). Δ finish TNS is relative to master; positive is better.

Degradations (designs failing a CI check)

Design Finish WNS: master → PR Finish TNS: master → PR Δ finish TNS Failing CI checks
gf180/jpeg -0.03358 → -0.08266 -0.1603 → -1.516 -846% Finish TNS (limit -1.36)
asap7/riscv32i-mock-sram (ps) -20.99 → -27.15 -762.7 → -6318 -728% Finish TNS (limit -952.7)
sky130hs/jpeg -0.2671 → -0.4667 -38.46 → -80.44 -109% CTS TNS: -36.49 → -58.96 (limit -43.78)
GRT antenna diodes: 25 → 159 (limit 100)
GRT TNS: -121.7 → -180.4 (limit -146)
GRT WNS: -0.3599 → -0.5449 (limit -0.5349)
Finish TNS (limit -46.15)
Finish WNS (limit -0.4421)
sky130hd/riscv32i -0.6411 → -0.4672 -20.59 → -35.47 -72% GRT TNS: -59.94 → -106 (limit -71.93)
Finish TNS (limit -24.71)
asap7/ethmac_lvt (ps) -13.5 → -16.5 -156.7 → -221.9 -42% Finish TNS (limit -216.7)
nangate45/tinyRocket -0.1223 → -0.1495 -20.17 → -24.58 -22% Finish TNS (limit -24.2)
nangate45/bp_fe_top -0.1619 → -0.1666 -5.075 → -6.143 -21% Finish TNS (limit -6.09)
sky130hs/riscv32i -0.2806 → -0.3826 -174.4 → -207.8 -19% CTS TNS: -79.35 → -127.6 (limit -95.22)
sky130hd/chameleon -0.2752 → -0.2849 -8.977 → -8.874 +1% CTS WNS: -0.4249 → -0.6128 (limit -0.5749)
GRT TNS: -12.34 → -15 (limit -14.81)
GRT WNS: -0.3593 → -0.5314 (limit -0.5093)
DRT antenna diodes: 63 → 109 (limit 100)
sky130hd/microwatt -1.211 → -1.15 -153.6 → -151.1 +2% DRT antenna diodes: 1562 → 1613 (limit 1564)
asap7/aes-block (ps) -24.96 → -22.99 -173.7 → -121.9 +30% CTS TNS: -1466 → -2133 (limit -1760)

Improvements (finish TNS 10% or more better)

Design Finish WNS: master → PR Finish TNS: master → PR Δ finish TNS
ihp-sg13g2/ibex -0.0694 → 0.1433 -0.9412 → 0 +100%
nangate45/bp_be_top -0.02125 → 0.01377 -0.1217 → 0 +100%
nangate45/ibex -0.009952 → 0.0005629 -0.2109 → 0 +100%
asap7/cva6 (ps) -43.22 → -25.66 -1249 → -521.4 +58%
asap7/ibex (ps) -45.83 → -33.85 -22264 → -9917 +55%
asap7/riscv32i (ps) -20.12 → -13.28 -5564 → -2808 +50%
sky130hs/ibex -0.6941 → -0.5582 -435.7 → -274 +37%
nangate45/aes -0.03803 → -0.02224 -0.1885 → -0.1383 +27%
nangate45/ariane133 -0.2572 → -0.2429 -424.4 → -312.2 +26%
ihp-sg13g2/riscv32i -2.465 → -1.801 -2108 → -1678 +20%
asap7/swerv_wrapper (ps) -97.11 → -88.23 -1796 → -1449 +19%
asap7/mock-cpu (ps) -33.66 → -31.69 -269.7 → -219.5 +19%
gf180/riscv32i -0.4474 → -0.3898 -4.886 → -4.125 +16%
nangate45/swerv_wrapper -0.3419 → -0.311 -354.2 → -312 +12%
sky130hd/jpeg -0.5595 → -0.5289 -90.32 → -79.61 +12%

Comment thread test/upf_aes.tcl
place_pins \
-hor_layers met3 \
-ver_layers met2
global_placement -skip_initial_place -density uniform -routability_driven -timing_driven

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this intended?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This design has no SDC, so no clock and no timing constraints, and TD-GPL was running on fake slacks.

Before removing TD from this design, it diverged at iteration 3220. Not having the SDC turned TD off after the first iteration, and routability couldn't converge later.

@eder-matheus

Copy link
Copy Markdown
Member Author

I see some good results on private designs as well, with only one degradation on TNS. I think this is good to merge

@precisionmoon
precisionmoon merged commit 50927c9 into The-OpenROAD-Project:master Oct 2, 2026
21 checks passed
@precisionmoon
precisionmoon deleted the gpl_rsz_fix_wns_mismatch branch October 2, 2026 20:57
@maliberty

Copy link
Copy Markdown
Member

@dsengupta0628 is it expected that "Loadless drivers (no fanout) have no required time, so their slack can be
worse than any real endpoint."?

@dsengupta0628

Copy link
Copy Markdown
Contributor

@dsengupta0628 is it expected that "Loadless drivers (no fanout) have no required time, so their slack can be worse than any real endpoint."?

This is a self contradictory line. No required time means it is unconstrained path and so “slack” at such a point has no meaning. It shouldn’t show up in any timing reports and optimizations should not worry about fixing such endpoints (except for drc vios) as there is literally no slack.

But if a slack exists on such a driver it means it must have had required time (slack=required-arrival), and on loadless driver it may have come from a set_output_delay annotation (intentional or accidental) on the endpoint- in which case that constraint must be honored. And it becomes a virtual endpoint.

so loadless driver with no required time but valid slack is incorrect. Either they are both valid or both infinite (no required and no slack)

@jhkim-pii

Copy link
Copy Markdown
Contributor

If it is a truly loadless driver, I think it should be removed.
We need to know why it becomes loadless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPL: Strange behavior when enabling repair_timing during timing-driven

6 participants