Skip to content

power: report_power sign-off regression + optimize_power leakage recovery#10851

Open
saurav-fermions wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
Fermions-ASI:feat/power
Open

power: report_power sign-off regression + optimize_power leakage recovery#10851
saurav-fermions wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
Fermions-ASI:feat/power

Conversation

@saurav-fermions

Copy link
Copy Markdown
Contributor

Summary

Two additive, opt-in power capabilities.

  1. report_power sign-off regression — make OpenSTA's existing report_power engine a documented, tested first-class sign-off capability: a deterministic design-level grouped power regression (report_power_design) covering the Sequential/Combinational/Clock/Macro/Pad/Total summary with Internal/Switching/Leakage/Total columns, and docs for report_power, set_power_activity, read_vcd/read_saif. Read-only.
  2. optimize_power — flag-gated optimize_power [-leakage] [-slack_margin m] [-verbose] that reduces static (leakage) power by swapping positive-slack cells to their lowest-leakage same-footprint Vt variant, keeping a swap only when it stays above the slack margin and does not degrade design WNS/TNS. Reuses the resizer's replaceCell + getVTEquivCells and the STA engine (timing not reimplemented); honors set_dont_touch/set_dont_use. No-op unless invoked.

Testing

Built openroad; the new regressions (dbSta.report_power_design, rsz.optimize_power_leakage, rsz.optimize_power_no_vt) pass, and the full rsz suite is green (244/244).

Notes

OpenSTA already provides a complete power engine and report_power command
that works in the OpenROAD shell. This makes it a documented, tested
first-class sign-off capability:

- Add deterministic design-level grouped power regression test
  (report_power_design) covering the Sequential/Combinational/Clock/
  Macro/Pad/Total summary with Internal/Switching/Leakage/Total columns,
  registered in both CMake and Bazel.
- Document report_power, set_power_activity, read_vcd/read_saif and the
  power model in src/dbSta/README.md.
- POWER_INVESTIGATION.md / AGENT_REPORT.md document findings and scope.

Additive only: no source or src/sta changes; timing commands unchanged.


Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
Add a flag-gated optimize_power [-leakage] [-slack_margin m] [-verbose]
command that reduces static (leakage) power by swapping logic cells on
positive-slack paths to their lowest-leakage same-footprint Vt variant
(e.g. SLVT/LVT -> RVT), keeping a swap only when it does not push the
cell below the slack margin and does not degrade design WNS/TNS.

Reuses the resizer's replaceCell + getVTEquivCells and the STA timing
engine for the slack checks (timing is not reimplemented). Honors
set_dont_touch / set_dont_use. Requires a multi-Vt library; with a
single-Vt library the design is left unchanged. The command is a no-op
unless explicitly invoked, so the default flow is byte-identical.

Tests (CMake + Bazel registered):
- optimize_power_leakage (ASAP7 RVT/LVT/SLVT, gcd_asap7_placed):
  leakage -3.34%, WNS/TNS unchanged.
- optimize_power_no_vt (Nangate45, single Vt): design unchanged.

rsz + dbSta suites: 325/325 pass.


Signed-off-by: Saurav Singh <saurav.singh@fermions.co>

@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 introduces a new optimize_power command in the resizer (rsz) tool to perform timing-safe leakage-power recovery by swapping positive-slack logic cells to their lowest-leakage same-footprint Vt variants without degrading WNS/TNS. It also adds comprehensive documentation, integration tests for this new optimization, and updates dbSta documentation and tests for design-level power reporting. There are no review comments, so I have no feedback to provide.

@saurav-fermions

Copy link
Copy Markdown
Contributor Author

Removed an accidental src/sta submodule-pointer bump (force-pushed); the PR is now src/sta-clean. Both commands remain additive / read-only-by-default (optimize_power is a no-op unless invoked).

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