Skip to content

fix: wrong pin in loadCap during hold repair#10092

Merged
eder-matheus merged 1 commit intoThe-OpenROAD-Project:masterfrom
suhr25:fix/repair-hold-load-cap
Apr 11, 2026
Merged

fix: wrong pin in loadCap during hold repair#10092
eder-matheus merged 1 commit intoThe-OpenROAD-Project:masterfrom
suhr25:fix/repair-hold-load-cap

Conversation

@suhr25
Copy link
Copy Markdown
Contributor

@suhr25 suhr25 commented Apr 9, 2026

SUMMARY

This PR fixes a wrong pin being used in hold repair, which caused incorrect load capacitance calculation and unsafe buffer insertion. The issue is in RepairHold::repairEndHold() (src/rsz/src/RepairHold.cc) and could introduce setup violations during hold fixing.


FIX

Before

float load_cap =
    graph_delay_calc_->loadCap(end_vertex->pin(), corner, max_)
    - excluded_cap;

After

float load_cap =
    graph_delay_calc_->loadCap(path_vertex->pin(), corner, max_)
    - excluded_cap;

VERIFICATION

Running repair_timing -hold before this fix could insert buffers on paths without enough setup slack, causing new violations. After the fix, capacitance is computed correctly, so buffer insertion respects setup constraints and avoids breaking clean paths.

@suhr25 suhr25 force-pushed the fix/repair-hold-load-cap branch 2 times, most recently from 36137ad to 3175d6f Compare April 9, 2026 11:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

@suhr25
Copy link
Copy Markdown
Contributor Author

suhr25 commented Apr 9, 2026

Hi @eder-matheus @maliberty,
Kindly review this PR.
Thanks!!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Contributor

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

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 load capacitance calculation in RepairHold.cc by switching the pin reference from end_vertex to path_vertex. I have no further feedback to provide.

Copy link
Copy Markdown
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

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

@eder-matheus please run a secure CI
@precisionmoon FYI

@maliberty
Copy link
Copy Markdown
Member

sky130he/aes will need a metrics update

@eder-matheus
Copy link
Copy Markdown
Member

Secure-CI started.

@suhr25 suhr25 force-pushed the fix/repair-hold-load-cap branch 2 times, most recently from 2ea6484 to c5f1102 Compare April 9, 2026 18:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

@suhr25 suhr25 force-pushed the fix/repair-hold-load-cap branch from c5f1102 to 71e719d Compare April 10, 2026 06:59
@github-actions github-actions bot added size/S and removed size/XS labels Apr 10, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@suhr25 suhr25 force-pushed the fix/repair-hold-load-cap branch from 71e719d to 02a4fd2 Compare April 10, 2026 07:06
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@suhr25 suhr25 force-pushed the fix/repair-hold-load-cap branch from 02a4fd2 to d7e69f9 Compare April 10, 2026 07:15
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

In repairEndHold(), the buffer delay guard used loadCap() on the
wrong pin (end_vertex, a sink) to estimate the inserted buffer's
load capacitance. This returned near-zero cap, making the guard
trivially permissive and relying entirely on the post-insertion
journal rollback.

Replacing it with loadCap() on the driver pin (path_vertex) is
semantically more correct but overestimates the buffer load: it
includes the full pre-split net parasitics, which are absent on
the shorter post-split net. This causes buffer_delays to be
overestimated, valid hold buffer insertions to be rejected by
the guard, and consequently worse slew and capacitance slack.

Fix: compute load_cap directly as the sum of pin capacitances of
load_pins — the exact set of pins the inserted buffer will drive.
This avoids counting parasitics from net segments that will not
exist after splitting, giving an accurate and non-pessimistic
guard estimate.

Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
@suhr25 suhr25 force-pushed the fix/repair-hold-load-cap branch from d7e69f9 to efe551e Compare April 10, 2026 09:10
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@suhr25
Copy link
Copy Markdown
Contributor Author

suhr25 commented Apr 10, 2026

All CI's are passing now.
Kindly take another look
Thanks!

@maliberty
Copy link
Copy Markdown
Member

@eder-matheus did private pass?

@eder-matheus
Copy link
Copy Markdown
Member

@eder-matheus did private pass?

Yes, all private designs are passing. Only nangate45/swerv_wrapper failed, but I believe this is due to the Yosys non-determinism. This should be safe to merge.

@eder-matheus eder-matheus merged commit c97783f into The-OpenROAD-Project:master Apr 11, 2026
16 checks passed
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.

3 participants