Skip to content

psm: report the average IR drop under the drop__average metric - #11097

Merged
gadfort merged 1 commit into
The-OpenROAD-Project:masterfrom
shivarammysore:psm-drop-average-metric
Aug 7, 2026
Merged

psm: report the average IR drop under the drop__average metric#11097
gadfort merged 1 commit into
The-OpenROAD-Project:masterfrom
shivarammysore:psm-drop-average-metric

Conversation

@shivarammysore

Copy link
Copy Markdown
Contributor

Fixes #11096, with both changes @gadfort asked for.

design_powergrid__drop__average passed results.avg_voltage, so on a power net it reported the supply voltage instead of the drop. avg_ir_drop was already computed in getSolution() and used correctly in the text report two lines earlier — it just never reached the metric.

It stayed hidden because on a ground net net_voltage == 0, so getSolution() sets avg_ir_drop = avg_voltage and the metric is accidentally right. Every run reports both a power and a ground net, so half the numbers always looked correct. On a 1.8 V power net the metric read 1.79999 where the average drop was 6.41e-06.

Changes

  • design_powergrid__drop__average now carries results.avg_ir_drop.
  • Adds design_powergrid__voltage__average carrying results.avg_voltage, so the value the old metric held is still published and named for what it is — and sits alongside the existing design_powergrid__voltage__worst.

Notes

  • No test goldens or docs reference these metric names, so nothing else needed updating — the two names are used only here.
  • The text report is unchanged; it was already correct.
  • Consumers keying on drop__average for power nets will see the value change (to the drop it was always named for); ground-net values are unaffected.

design_powergrid__drop__average carried results.avg_voltage, so on a power net
it reported the supply voltage rather than the drop. avg_ir_drop was already
computed and used in the text report, but never reached the metric.

The mistake was invisible on a ground net, where net_voltage is 0 and
getSolution() sets avg_ir_drop = avg_voltage, so half of every run looked
correct. On a 1.8 V power net the metric read 1.79999 where the average drop
was 6.41e-06.

Also adds design_powergrid__voltage__average, so the value that metric used to
carry is still available and is named for what it is, alongside the existing
design_powergrid__voltage__worst.

Fixes The-OpenROAD-Project#11096

Signed-off-by: Shivaram Mysore <shivaram.mysore@gmail.com>
@shivarammysore
shivarammysore requested a review from a team as a code owner August 7, 2026 18:42
@shivarammysore
shivarammysore requested a review from gadfort August 7, 2026 18:42

@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 updates the metric logging in IRSolver::report by correcting the metric key for average voltage to design_powergrid__voltage__average and adding a new metric log for average IR drop with the key design_powergrid__drop__average. There are no review comments, so I have no feedback to provide.

@github-actions github-actions 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.

Welcome to OpenROAD! Thanks for opening your first PR.
Before we review:

Please ensure:

  • CI passes
  • Code is properly formatted
  • Tests are included where applicable
    A maintainer will review shortly!

@gadfort gadfort 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.

LGTM. Thanks.

@gadfort
gadfort merged commit 8bf9a07 into The-OpenROAD-Project:master Aug 7, 2026
17 checks passed
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.

psm: design_powergrid__drop__average metric reports the average voltage, not the average IR drop

2 participants