Skip to content

rsz: SizeDownMove and BaseMove max cap/slew checks only consider a single timing corner #9793

@Vi-shub

Description

@Vi-shub

Description

SizeDownMove::downSizeGate() in src/rsz/src/SizeDownMove.cc (L327-347) calls checkMaxCapViolation() and checkMaxSlewViolation() to validate downsized cell candidates. However, both functions only check against a single timing corner, as noted by two explicit FIXMEs:
FIXME 1 : BaseMove::checkMaxCapViolation() at L840:

// FIXME: Can we update to consider multiple corners? output_port->capacitanceLimit(resizer_->max_, max_cap, cap_limit_exists);

FIXME 2 : SizeDownMove::downSizeGate() at L333:

// FIXME: Only applies to current corner if (checkMaxCapViolation(output_pins[i], output_port, output_caps[i])) {

Why this matters:

In multi-corner/multi-mode (MCMM) designs which are standard practice for advanced nodes a cell swap that passes cap/slew checks at the current analysis corner may violate limits at another corner. For example:

A slow corner may have a different (tighter) max_cap limit
Different PVT conditions change drive resistance, affecting slew
Without multi-corner checking, SizeDownMove can introduce violations that repair_design must later fix or worse, violations that slip through entirely if repair doesn't re-check all corners.

Suggested Solution

Update checkMaxCapViolation() and checkMaxSlewViolation() in BaseMove.cc to iterate over all timing corners:

  1. checkMaxCapViolation() : Replace the single capacitanceLimit() call with a loop over all scenes:
bool BaseMove::checkMaxCapViolation(const sta::Pin* output_pin, sta::LibertyPort* output_port, float output_cap) { // Check across all corners instead of just one for (const sta::Scene* scene : *sta_->scenes()) { float max_cap; bool cap_limit_exists; sta_->findCapLimit(output_port, scene, resizer_->max_, max_cap, cap_limit_exists); if (cap_limit_exists && max_cap > 0.0 && output_cap > max_cap) { // ... existing debugPrint ... return true; } } return false; }
  1. checkMaxSlewViolation() : Similarly update to use sta_->findSlewLimit() across all corners.

  2. SizeDownMove::downSizeGate() : Update the output cap computation to also check across corners (currently uses a single scene parameter).

The multi-corner pattern already exists in RepairDesign::checkSlew() (L1233) which calls sta_->checkSlew() across sta_->scenes() this can serve as a reference implementation.

I would like to work on a PR for this. @precisionmoon @maliberty @eder-matheus please assign this to me.

Additional Context

Impact: QoR regression in MCMM designs unchecked violations in non-active corners may persist through the flow.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions