Skip to content

pdn: prefer BTerms of same net name and avoid finding bterms for each shape#10606

Merged
eder-matheus merged 5 commits into
The-OpenROAD-Project:masterfrom
gadfort:pdn-prefer-name-match
Jun 8, 2026
Merged

pdn: prefer BTerms of same net name and avoid finding bterms for each shape#10606
eder-matheus merged 5 commits into
The-OpenROAD-Project:masterfrom
gadfort:pdn-prefer-name-match

Conversation

@gadfort

@gadfort gadfort commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

When multiple exisiting bterms are present on a net, prefer the one with the same name, otherwise fall back to the first one.
Also moves the bterm creation to the start of the database writing instead of at each shape (no impact but avoids a bunch of name lookups at the inner most part of the writing.

Type of Change

  • Bug fix
  • Breaking change (bterm name check)

Impact

Avoids randomly selecting a bterm of a different name when one with the same name is available.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

gadfort added 2 commits June 7, 2026 13:48
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
@gadfort gadfort requested a review from a team as a code owner June 7, 2026 18:13
@gadfort gadfort requested a review from maliberty June 7, 2026 18:14
@github-actions github-actions Bot added the size/M label Jun 7, 2026

@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 refactors how boundary terminals (dbBTerm) are handled and created during PDN generation. Instead of dynamically finding or creating dbBTerm instances inside individual shape-writing routines, they are now pre-allocated and mapped in PdnGen::writeToDb and passed down through the grid and grid components to the shapes. Additionally, any unused empty dbBTerm instances are cleaned up at the end of the database write. A new integration test has been added to verify behavior with multiple boundary terminals on a net. There are no review comments to address, and I have no additional feedback to provide.

@maliberty

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

@maliberty

Copy link
Copy Markdown
Member

Please address

11:36:32  The following tests FAILED:
11:36:32  	6904 - ram.make_7x7_nangate45.tcl (Failed)               IntegrationTest tcl ram log_compare
11:36:32  	7524 - pdn.core_grid_with_multiple_bterms.tcl (Failed)   IntegrationTest tcl pdn log_compare

before mergin

@gadfort gadfort requested a review from a team as a code owner June 7, 2026 19:41
@gadfort gadfort requested a review from eder-matheus June 7, 2026 19:41
@eder-matheus eder-matheus enabled auto-merge June 8, 2026 14:09
@eder-matheus eder-matheus merged commit 3c8215d into The-OpenROAD-Project:master Jun 8, 2026
15 of 16 checks passed
@gadfort gadfort deleted the pdn-prefer-name-match branch June 8, 2026 14:26
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.

3 participants