rsz: fix hold-buffer count reset on repair_timing -hold rollback#10835
Open
minjukim55 wants to merge 2 commits into
Open
Conversation
repairEndHold() reset inserted_buffer_count_ to 0 whenever a single hold-buffer insertion was rolled back, instead of decrementing it by one. Each insertion is exactly one journalBegin()/makeHoldDelay() pair (count incremented once); journalRestore() only undoes that single insertion, not any buffer committed earlier in the same repair_hold run. So the running total (and therefore the final "Inserted N hold buffers" line, the per-iteration table, and the max_buffer_count safety valve) no longer reflected reality once any rollback occurred. Signed-off-by: Minju Kim <mkim@precisioninno.com>
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
maliberty
reviewed
Jul 7, 2026
| && setup_slack_after < setup_margin)) { | ||
| resizer_->journalRestore(); | ||
| inserted_buffer_count_ = 0; | ||
| inserted_buffer_count_--; |
Member
There was a problem hiding this comment.
RepairHold::makeHoldDelay can return early in which case this would be wrong.
Rework the repair_timing -hold buffer accounting so the counters are updated only when a trial insertion is committed (journalEnd), mirroring GlobalSizingPolicy's accept-only accounting. makeHoldDelay now returns a HoldMoveStats value instead of mutating inserted_buffer_count_ and resize_count_ as a side effect, so an early return or a rolled-back insertion contributes nothing. This supersedes the earlier decrement-on-rollback, which assumed makeHoldDelay always incremented exactly once and left resize_count_ inflated on rollback. Apply the same fix to RecoverPower: a downsize that is rolled back (journalRestore) no longer inflates resize_count_; the count is bumped only at the journalEnd commit points. Signed-off-by: Minju Kim <mkim@precisioninno.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
repairEndHold()resetinserted_buffer_count_to0on a rolled-back hold-buffer insertion instead of decrementing by one.journalBegin()+makeHoldDelay()pair, incrementing the count once.journalRestore()only undoes that single insertion, not any buffer committed earlier in the same run — so--exactly cancels the one insertion just attempted, while= 0wiped out every buffer counted so far.Inserted N hold buffersline, the per-iteration table, and defeated themax_buffer_percentsafety valve (it could never trip).Type of change
Impact
repair_hold*goldens unaffected).Verification
rsz.repair_hold*ctest group (19 tests) — all pass.Related Issues
Fixes The-OpenROAD-Project-private/OpenROAD-flow-scripts#1737