Skip to content

rsz: Rename strongerCellLess to weakerCellFirst()#10934

Open
jhkim-pii wants to merge 9 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-fix-stronger-cell-less
Open

rsz: Rename strongerCellLess to weakerCellFirst()#10934
jhkim-pii wants to merge 9 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-fix-stronger-cell-less

Conversation

@jhkim-pii

@jhkim-pii jhkim-pii commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Simple refactoring w/ minor tie-break logic change.

  • Rename strongerCellLess() to weakerCellFirst() w/ a tie-breaker logic change.
  • Rename the comparator and Liberty AP index arguments for clarity.
  • Add TestResizer coverage for drive-resistance and intrinsic-delay ordering.
  • No QoR impact (tested locally)

Correct the shared size-up comparator so lower drive resistance cells sort ahead of weaker alternatives. Rename the comparator to describe its ordering contract and update both size-up generators. Add a TestResizer regression using Nangate45 buffer strengths to lock the behavior.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Rank swappable cells using drive resistance and intrinsic delay only. Output pin capacitance is not a direct measure of drive strength and exact ties may remain equivalent. Rename the local drive variables to make the resistance metric explicit.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Rename the MoveGenerator implementation parameters from lib_ap to lib_ap_index. This matches the LibertyPort scenePort API terminology and makes the value's role as an index explicit.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Rename the MoveGenerator helper declaration parameters to lib_ap_index. This keeps the header consistent with the implementations and the LibertyPort scenePort API terminology.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
@jhkim-pii jhkim-pii self-assigned this Jul 17, 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 refactors the cell strength comparison logic in MoveGenerator by renaming strongerCellLess to strongerCellFirst and simplifying its comparison to only use drive resistance and intrinsic delay, removing capacitance. It also adds a unit test to verify this ordering. The reviewer suggests adding a unique integer ID as a tie-breaker in the comparison to ensure strict weak ordering and deterministic sorting when the drive resistance and intrinsic delay are equal.

Comment thread src/rsz/src/move/MoveGenerator.cc Outdated
Order swappable cells from higher to lower drive resistance so legacy size-up chooses the smallest improving step and MT score ties prefer it. Rename the shared comparator and update its regression test while retaining the drive-resistance and intrinsic-delay ordering keys.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Treat larger intrinsic delay as weaker when drive resistance ties so both comparator keys use descending order. Add an equal-drive Liberty fixture and regression coverage because the Nangate45 buffer family cannot isolate the intrinsic-delay tie.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
@jhkim-pii jhkim-pii changed the title rsz: Correct stronger cell ordering rsz: Renamed strongerCellLess API Jul 18, 2026
@jhkim-pii jhkim-pii changed the title rsz: Renamed strongerCellLess API rsz: Rename strongerCellLess to weakerCellFirst() Jul 18, 2026
@jhkim-pii

Copy link
Copy Markdown
Contributor Author

@codex review

@jhkim-pii
jhkim-pii marked this pull request as ready for review July 18, 2026 11:40
@jhkim-pii
jhkim-pii requested a review from a team as a code owner July 18, 2026 11:40
@jhkim-pii
jhkim-pii requested a review from precisionmoon July 18, 2026 11:40

@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: 5ab328afac

ℹ️ 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/move/MoveGenerator.cc
Permit legacy size-up to select an equal-drive replacement when its estimated stage delay improves. Extend the MT drive filter to equal resistance while retaining the strict delay-improvement check in candidate estimation and excluding the current cell.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Remove the weaker-to-stronger ordering from the multi-threaded size-up generator. The policy estimates every candidate and selects the highest score, so sorting only added unnecessary work and an implicit equal-score tie break.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Rename the current-cell drive resistance variable to drive_r in both size-up generators. This makes the resistance comparison direction explicit and avoids reading the value as drive strength.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
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.

1 participant