Skip to content

pdn: throw error on missing grid when adding components instead of silent pass#10643

Open
gadfort wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
gadfort:pdn-error-on-missing-grid
Open

pdn: throw error on missing grid when adding components instead of silent pass#10643
gadfort wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
gadfort:pdn-error-on-missing-grid

Conversation

@gadfort

@gadfort gadfort commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Ensures the power grid definition will generate an error when an undefined grid is referenced. This avoids nasty PDN errors when typos appear in the grid component commands and there is no error.

Type of Change

  • Bug fix

Impact

For most users a warning will appear when a unused grid is created, but unless they have setup errors, there should be no change to the final result.

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).

…lent pass

Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
@gadfort gadfort requested a review from a team as a code owner June 12, 2026 00:26
@gadfort gadfort requested a review from maliberty June 12, 2026 00:26

@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 dummy instance grids to handle cases where no instances are found for a macro grid definition, preventing hard failures and instead issuing a warning. Key changes include the addition of the DummyInstanceGrid class, updates to grid retrieval and lookup methods to support dummy grids, and integration into the Tcl grid definition flow. Two critical issues were identified in the Tcl implementation: an invalid empty command evaluation [] used for list initialization, and a SWIG type mismatch caused by passing a list of domains instead of iterating over them individually.

Comment thread src/pdn/src/pdn.tcl Outdated
Comment thread src/pdn/src/pdn.tcl
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
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