Skip to content

pdn: dont rely on just the intersection for via insertion, check actual layer shape if initial ensure does not yield valid vias - #11193

Open
gadfort wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
gadfort:pdn-via-enclosure
Open

pdn: dont rely on just the intersection for via insertion, check actual layer shape if initial ensure does not yield valid vias#11193
gadfort wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
gadfort:pdn-via-enclosure

Conversation

@gadfort

@gadfort gadfort commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

If the overlap / intersection does not allow for any enclosure, PDN would just reject that via, this change ensures we add back the enclosure from the actual shape if possible when the via enclosure is violated.

Type of Change

  • Bug fix

Impact

Allows for vias to be inserted with thinner metals

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

…al layer shape if initial ensure does not yield valid vias

Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
@gadfort
gadfort requested a review from a team as a code owner August 20, 2026 16:11
@gadfort
gadfort requested a review from maliberty August 20, 2026 16:11

@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 the calculation and application of spare enclosures for bottom and top layers during via generation, updating enclosure checks and disabling caching when spare enclosures are applied. The feedback suggests simplifying the code in ViaGenerator::determineRowsAndColumns by removing redundant duplicate variables (double_enc_x_lower/double_enc_x_upper and double_enc_y_lower/double_enc_y_upper) that have identical values and can be merged back into single variables.

Comment thread src/pdn/src/via.cpp Outdated
Comment thread src/pdn/src/via.cpp Outdated
Comment thread src/pdn/src/via.cpp
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
@maliberty

Copy link
Copy Markdown
Member

The whittle test fails

[2026-08-20T17:31:05.227Z] [whittle] Phase: Nets, Step 39, Insts: 6, Nets: 0, .odb: 1MB (was 0MB), Elapsed: 8m
[2026-08-20T17:31:05.227Z] Traceback (most recent call last):
[2026-08-20T17:31:05.227Z]   File "/home/jenkins/agent/workspace/OpenROAD-Public_PR-11193-merge-2-bazel-ci/etc/whittle.py", line 516, in <module>
[2026-08-20T17:31:05.227Z]     main()
[2026-08-20T17:31:05.227Z]   File "/home/jenkins/agent/workspace/OpenROAD-Public_PR-11193-merge-2-bazel-ci/etc/whittle.py", line 512, in main
[2026-08-20T17:31:05.227Z]     whittler.debug()
[2026-08-20T17:31:05.227Z]   File "/home/jenkins/agent/workspace/OpenROAD-Public_PR-11193-merge-2-bazel-ci/etc/whittle.py", line 470, in debug
[2026-08-20T17:31:05.227Z]     current_err, cuts = self.perform_step(cut_index=j)
[2026-08-20T17:31:05.227Z]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2026-08-20T17:31:05.227Z]   File "/home/jenkins/agent/workspace/OpenROAD-Public_PR-11193-merge-2-bazel-ci/etc/whittle.py", line 384, in perform_step
[2026-08-20T17:31:05.227Z]     start = num_elms * cut_index // cuts
[2026-08-20T17:31:05.227Z]             ~~~~~~~~~~~~~~~~~~~~~^^~~~~~
[2026-08-20T17:31:05.227Z] ZeroDivisionError: integer division or modulo by zero

I don't know how this relates to this change.

@gadfort

gadfort commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@maliberty I saw that too, I can't imagine that it's related, I didn't look that closely at the test. It's possible retriggering it will clear it.

@gadfort

gadfort commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@maliberty the rerun failed in new ways. Seems like the CI is having some issues.

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.

2 participants