rsz: Rename strongerCellLess to weakerCellFirst()#10934
Conversation
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>
There was a problem hiding this comment.
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.
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>
strongerCellLess API
strongerCellLess APIstrongerCellLess to weakerCellFirst()
|
@codex review |
There was a problem hiding this comment.
💡 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".
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>
Simple refactoring w/ minor tie-break logic change.
strongerCellLess()toweakerCellFirst()w/ a tie-breaker logic change.