Skip to content

rsz: Merge rsz-buffering-boost for Rebuffer QoR gain - #10866

Merged
maliberty merged 20 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-rsz-buffering-boost
Jul 21, 2026
Merged

maliberty merged 20 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-rsz-buffering-boost

Conversation

@minjukim55

Copy link
Copy Markdown
Member

Summary

Port of the upstream rsz rebuffering-accuracy series (original author
Martin Povišer). Core idea: rebuffer builds its buffer trees from an internal
delay/slew estimate that had drifted away from the model repair_design (and
signoff STA) actually use — so rebuffer would optimize for numbers that later
stages disagree with. The series realigns that estimate and fixes several
errors in the buffered-net cost model.

The 8 substantive commits:

  1. Move the shape factor to Resizer — relocate the slew "shape factor"
    (the NLDM-derived slew/load correction) into the shared Resizer so
    rebuffer and repair_design read one consistent value instead of keeping
    separate copies that can diverge.
  2. Use the new slew degradation model in rebuffer — repair_design
    recently got a new slew degradation model; adopt the identical model inside
    rebuffer so its internal estimate matches the signed-off timing model.
  3. Fix the wire-splitting formula — stop scaling r_drvr by the shape
    factor. r_drvr is the asymptotic slew/load ratio derived from NLDM data
    and already contains the shape factor, so the extra scaling double-counted
    it.
  4. Adjust the buffering-test methodology — when measuring the delay on a
    buffered net, include the driving gate delay so the measurement uses the
    same delay definition as the estimator.
  5. Improve junction placement in the buffer topology rewrite — place the
    Steiner junctions of the rewritten buffer tree more accurately, tightening
    the estimated wirelengths and loads the cost model sees.
  6. Fix buffer-load miscount — pass loads to the gate-delay calculator
    exclusive of the driving port capacitance (the driver's own pin cap was
    being counted into the load it drives).
  7. Redo the long-wire algorithm — rework the long-wire buffering /
    length-estimation path so the iterative length estimate stays accurate on
    long, high-fanout nets.
  8. Add zero-RC guards — guard the RC math against zero wire RC (0 * inf
    → NaN); fixes the STA-1350 "gate delay load cap is NaN" crash in
    fully_rebuffer on nets with no parasitics.

(The branch also carries small housekeeping commits: two clang-format fixes and
one test-golden update for the numeric churn below.)

QoR

5 random placement seeds × 2 binaries (base = pre-series, test = this branch)
on a customer design (advanced-node PDK), full flow place → CTS → route.
Everything downstream of the binary is identical (same floorplan, same seeds),
so the delta isolates the change.

  • WS = global setup worst slack (ns). % = test vs base (+ = better).
  • fmax % is derived from the global WNS so it always tracks WS — the
    per-clock fmax metric picks a different worst path and can move opposite to
    WS.

PLACE

seed WS base WS test WS % fmax %
1 -0.0959 -0.0638 +33.4% +7.39%
2 -0.0906 -0.0876 +3.3% +0.65%
3 -0.1222 -0.0707 +42.2% +11.69%
4 -0.0825 -0.1017 -23.2% -4.06%
5 -0.0871 -0.1140 -30.8% -5.55%
mean -0.0957 -0.0876 +8.5% +1.85%

CTS

seed WS base WS test WS % fmax %
1 -0.0892 -0.0569 +36.2% +7.56%
2 -0.0785 -0.0691 +12.0% +2.14%
3 -0.0885 -0.0607 +31.4% +6.45%
4 -0.1004 -0.0553 +44.9% +10.58%
5 -0.1132 -0.0366 +67.7% +18.83%
mean -0.0939 -0.0557 +40.7% +8.98%

GRT (global route)

seed WS base WS test WS % fmax %
1 -0.1433 -0.0971 +32.3% +9.89%
2 -0.0948 -0.0724 +23.6% +5.06%
3 -0.0907 -0.0889 +2.0% +0.40%
4 -0.1571 -0.0890 +43.3% +14.84%
5 -0.1201 -0.0906 +24.6% +6.42%
mean -0.1212 -0.0876 +27.7% +7.08%

Takeaway: consistent setup-WS / fmax improvement from CTS onward
(CTS +8.98%, GRT +7.08% fmax mean; 5/5 seeds improve at both stages). PLACE is
seed-noisy and nets to a small gain — the estimate matches the signed-off timing
model once CTS/routing make that model accurate.

Related Issues

Upstream rsz rebuffering-accuracy series. QoR validation tracked internally
(private).

povik and others added 11 commits July 7, 2026 15:12
Signed-off-by: Martin Povišer <povik@cutebit.org>
Recently repair_design received a new slew degradation model, use the
same model in rebuffer.

Signed-off-by: Martin Povišer <povik@cutebit.org>
r_drvr should not be scaled by the shape factor as it is derived from
NLDM data as the asymptotic slew/load ratio and as such it already
includes the shape factor.

Signed-off-by: Martin Povišer <povik@cutebit.org>
When measuring the delay on a buffered net include the driving gate
delay.

Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Martin Povišer <povik@cutebit.org>
Fix load values passed to the gate delay calculator to be exclusive
of the driving port capacitance.

Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Minju Kim <mkim@precisioninno.com>
Signed-off-by: Minju Kim <mkim@precisioninno.com>
Cherry-picked from 86b8145b48 to fix STA-1350 gate delay load cap is
NaN crash in fully_rebuffer when a net has zero wire RC (0 * inf).

Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Minju Kim <mkim@precisioninno.com>
Regenerate unit .ok logs (rsz/gpl/openroad), their secondary golden
outputs (.defok/.vok DEF/verilog), and aes/jpeg/ibex sky130 flow
.metrics + .metrics_limits for the numeric churn from the
estimation-accuracy rebuffering changes.

The flow pass/fail gate is .metrics_limits (check_test_metrics compares
the result against it; .metrics is the reference used to recompute the
limits). Both are regenerated from a local run of the branch binary.

Secondary DEF/verilog goldens are regenerated alongside the .ok logs so
the in-test diff_file/diff_files comparisons pass and no "Differences
found" text leaks into the committed .ok (No-Diffs-In-Ok-Files check).

Note: ibex_sky130hs DRT::ANT::errors limit moves 0 -> 1 (one antenna
violation from the changed routing). All other diffs are expected metric
shifts (buffer counts, slew/cap slack, clock skew). No crashes; verified
locally: rsz 241/241 pass, gpl tcl+py pass, openroad.upf_aes pass.

Signed-off-by: Minju Kim <mkim@precisioninno.com>
@minjukim55 minjukim55 self-assigned this Jul 10, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

The number of changes in this pull request is too large for Gemini Code Assist to generate a review.

…g-boost

Signed-off-by: Minju Kim <mkim@precisioninno.com>

# Conflicts:
#	src/rsz/src/RepairDesign.cc
repair_design6 is a master-added test (reroute feature). After merging
the rsz rebuffering estimation-accuracy series, the improved slew/RC
estimation inserts 215 buffers (was 285) with slightly better slack
(+115.5% vs +112.4%); no new violations. Regenerate the golden.

Signed-off-by: Minju Kim <mkim@precisioninno.com>
@minjukim55

Copy link
Copy Markdown
Member Author

@minjukim55
minjukim55 marked this pull request as ready for review July 13, 2026 06:43
@minjukim55
minjukim55 requested review from a team as code owners July 13, 2026 06:43
openroad-ci pushed a commit to The-OpenROAD-Project-staging/OpenROAD-flow-scripts that referenced this pull request Jul 13, 2026
Pin tools/OpenROAD at the rsz rebuffering estimation-accuracy series head
(The-OpenROAD-Project/OpenROAD#10866, upstream author Martin Poviser). This
drops the earlier SparseLU-guard bump so the submodule pin resolves against
public OpenROAD for ORFS CI.

Signed-off-by: Minju Kim <mkim@precisioninno.com>

@gudeh gudeh 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.

Changes to GPL are only golden test files.

@jhkim-pii

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17d1e1d0f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/rsz/src/Rebuffer.cc Resolved
Comment thread src/rsz/include/rsz/Resizer.hh Resolved
Comment thread src/rsz/src/RepairDesign.cc Resolved
Signed-off-by: Minju Kim <mkim@precisioninno.com>

# Conflicts:
#	test/aes_sky130hd.metrics
#	test/aes_sky130hd.metrics_limits
#	test/ibex_sky130hs.metrics
#	test/ibex_sky130hs.metrics_limits
#	test/jpeg_sky130hs.metrics
#	test/jpeg_sky130hs.metrics_limits
#	test/upf_aes.defok
#	test/upf_aes.ok
Comment thread src/rsz/src/RepairDesign.cc Resolved
Comment thread src/rsz/src/RepairDesign.cc Resolved
Comment thread src/rsz/src/RepairDesign.cc Resolved
Comment thread src/rsz/src/RepairDesign.cc Resolved
Comment thread src/rsz/src/Rebuffer.cc Resolved
@github-actions github-actions Bot added size/L and removed size/XL labels Jul 16, 2026
Comment thread src/rsz/test/repair_design6.ok Resolved
@minjukim55
minjukim55 force-pushed the secure-rsz-buffering-boost branch from c340f92 to b383f98 Compare July 16, 2026 15:07
@github-actions github-actions Bot added size/XL and removed size/L labels Jul 17, 2026
Integrate the rsz policy/optimizer refactor, reroute feature, and other
master changes. The rebuffering estimation-accuracy series source is
resolved against the refactored rsz; the affected test goldens are
regenerated in the following commit.

Signed-off-by: Minju Kim <mkim@precisioninno.com>
@minjukim55
minjukim55 force-pushed the secure-rsz-buffering-boost branch from 09ec48a to 20a3489 Compare July 20, 2026 12:12
@github-actions github-actions Bot added size/L and removed size/XL labels Jul 20, 2026
Regenerate unit .ok logs (rsz/gpl/openroad), their secondary golden
outputs (.defok/.vok DEF/verilog), and aes/jpeg/ibex sky130 flow
.metrics + .metrics_limits for the numeric churn from the
estimation-accuracy rebuffering changes.

The flow pass/fail gate is .metrics_limits (check_test_metrics compares
the result against it; .metrics is the reference used to recompute the
limits). Both are regenerated from a local run of the branch binary.

Secondary DEF/verilog goldens are regenerated alongside the .ok logs so
the in-test diff_file/diff_files comparisons pass and no "Differences
found" text leaks into the committed .ok (No-Diffs-In-Ok-Files check).

Also regenerate the repair_design6 golden (a master-added reroute test):
the improved slew/RC estimation inserts fewer buffers with slightly
better slack and no new violations.

Note: ibex_sky130hs DRT::ANT::errors limit moves 0 -> 1 (one antenna
violation from the changed routing). All other diffs are expected metric
shifts (buffer counts, slew/cap slack, clock skew).

Signed-off-by: Minju Kim <mkim@precisioninno.com>
@minjukim55
minjukim55 force-pushed the secure-rsz-buffering-boost branch from 20a3489 to 0cb1ec3 Compare July 20, 2026 12:41
@github-actions github-actions Bot added size/XL and removed size/L labels Jul 20, 2026
Advance the branch to current OR master so PR The-OpenROAD-Project#3585 stays mergeable
(master moved 20d2d5c -> 06c1421: rsz max-iter/drive-resistance/cell-order,
dpl negotiation, rcx). Golden conflicts (aes/jpeg sky130hd metrics) are
resolved and regenerated against the merged binary in the following commit.

Signed-off-by: Minju Kim <mkim@precisioninno.com>
After advancing to OR master 06c1421 (merge M2) and with the
slew_shape_factor fix reverted, regenerate the flow goldens against the
merged binary:
- aes_sky130hd / ibex_sky130hs / jpeg_sky130hd: recompute .metrics_limits
  (DRV slew/cap slack + clock_skew shift from the reverted slew estimate).
- tinyRocket_nangate45: reverting the fix restores the slew_shape_factor
  double-count, which over-estimates slew -> extra buffering -> global-route
  congestion overflow (GRT-0228). Enlarge the pipe-cleaner floorplan
  (die 500->540, core 490->530) so it routes; regen .metrics/.metrics_limits.

Signed-off-by: Minju Kim <mkim@precisioninno.com>
Resolve upf_aes .ok/.defok golden conflicts by regenerating against the
merged binary (buffering-boost rsz + master DPL/GPL negotiation changes).

Signed-off-by: Minju Kim <mkim@precisioninno.com>
…buffer count fix) into rsz-buffering-boost

rsz sources auto-merged. Regenerate aes_sky130hd / jpeg_sky130hd metric +
limit goldens against the merged binary (buffering-boost + The-OpenROAD-Project#10835): e.g. aes
RSZ::hold_buffer_count settles at 330 (neither the pre-fix 19 nor master 343).

Signed-off-by: Minju Kim <mkim@precisioninno.com>
@minjukim55

Copy link
Copy Markdown
Member Author

As per discussion, merge without addressing the slew double-counting issue. This issue will be tracked and addressed in a separate PR.

@maliberty
maliberty merged commit 3bb4132 into The-OpenROAD-Project:master Jul 21, 2026
16 checks passed
@maliberty
maliberty deleted the secure-rsz-buffering-boost branch July 21, 2026 13:30
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.

5 participants