rsz: check max cap/slew across all timing corners#9849
rsz: check max cap/slew across all timing corners#9849Vi-shub wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Conversation
Update checkMaxCapViolation() to use sta_->checkCapacitance() across all corners instead of single-corner capacitanceLimit(). Update checkMaxSlewViolation() to iterate sta_->scenes() instead of taking a single scene parameter. Closes The-OpenROAD-Project#9793 Signed-off-by: Vi-shub <smsharma3121@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request effectively addresses the issue of checking maximum capacitance and slew violations across all timing corners, rather than a single one. The changes in BaseMove.cc correctly integrate multi-corner checks using sta_->checkCapacitance for capacitance and an iteration over sta_->scenes() for slew. The corresponding header file (BaseMove.hh) and call sites in SizeDownMove.cc have been updated to reflect these changes, and the relevant FIXME comments have been removed. This is a significant improvement for multi-corner/multi-mode (MCMM) designs.
| float cap1, max_cap1, cap_slack1; | ||
| const sta::Scene* corner1; | ||
| const sta::RiseFall* tr1; |
There was a problem hiding this comment.
The variables cap1, cap_slack1, and tr1 are declared as output parameters for sta_->checkCapacitance but are not used in the subsequent logic within this function. While they are output parameters, if their values are not needed, consider if they can be omitted or if a comment should clarify why they are declared but not used, to improve code clarity.
Fixes #9793
Problem
BaseMove::checkMaxCapViolation()and checkMaxSlewViolation() only checked against a single timing corner, as noted by two FIXMEs:BaseMove.cc:L840// FIXME: Can we update to consider multiple corners?SizeDownMove.cc:L333// FIXME: Only applies to current cornerIn multi-corner/multi-mode (MCMM) designs, a cell swap passing checks at the current corner may violate limits at another corner (e.g., slow corner has different
max_cap).Changes
BaseMove::checkMaxCapViolation()replaced single-corneroutput_port->capacitanceLimit()withsta_->checkCapacitance(pin, sta_->scenes(), ...)which queries across all corners and returns the worst violation. Follows the pattern used byRepairDesign::needRepairCap().BaseMove::checkMaxSlewViolation()replaced singlesceneparameter with iteration oversta_->scenes(), checking the slew limit at every corner. Removed thesceneparameter from the function signature.SizeDownMove.cc removed both FIXME comments, updated the call site.
Testing
All existing rsz regression tests pass. The change is conservative (more checking = more restrictive), so no golden file updates needed.