pdn: check via enclosure and try again when merging changes width - #11212
pdn: check via enclosure and try again when merging changes width#11212gadfort wants to merge 5 commits into
Conversation
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the via generation logic in the PDN module to correctly handle width-conditioned rules on shared routing layers in a via stack by iteratively rebuilding the stack based on the merged metal widths. It also transitions via storage to use std::unique_ptr for safer memory management. The review feedback suggests several improvements: updating getLowerHeight and getUpperHeight to handle horizontal shared routing layers, resolving signed/unsigned comparison warnings by using size_t in loops, adding a maximum iteration limit to the rebuilding loop to prevent infinite loops, and adding default member initializers to the Constraint struct to avoid uninitialized variables.
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f866f8e660
ℹ️ 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".
| const int merged_width | ||
| = std::min(std::max(below_via->getGeneratorWidth(false), | ||
| above_via->getGeneratorWidth(true)), | ||
| std::max(below_via->getGeneratorHeight(false), | ||
| above_via->getGeneratorHeight(true))); |
There was a problem hiding this comment.
Measure the final shared-layer geometry
When adjacent vias are displaced by the per-layer snapToGrid logic, or when adjustToMinArea enlarges their shared-layer patch, the pads are not concentric and the final union can be wider than the maximum of these unshifted generator dimensions. DbGenerateStackedVia::generate creates that actual union in via.cpp:976-1038, but its subsequent recheckConstraints call disables enclosure checking, so a final shape that crosses a LEF58 width tier can silently retain an undersized enclosure. Measure or recheck the actual merged geometry rather than only these generator extents.
AGENTS.md reference: AGENTS.md:L20-L20
Useful? React with 👍 / 👎.
Summary
Closes #11129
Iteratively resolves the stacked vias to ensure they are re-evaluated on changes.
Type of Change
Impact
Verification
./etc/Build.sh).Related Issues
#11129