Repository navigation
odb: require matching layers for pin abutment - #11814
jinchuntan wants to merge 2 commits into
Conversation
Keep the routing layer with each transformed pin rectangle so pins on different metal layers are not treated as already connected. Add database regressions for cross-layer overlaps and multiple pin shapes while preserving same-layer overlap and edge contact. Fixes The-OpenROAD-Project#11810 Signed-off-by: Nigel Tan <nigeltanjc@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request updates the dbNet::isConnectedByAbutment function to verify that overlapping pins are on the same technology layer before considering them connected. It also adds a new test suite, TestNetAbutment, to cover these scenarios. The review feedback recommends using boost::container::small_vector instead of std::vector to avoid heap allocations, as the number of pin boxes is typically small.
There was a problem hiding this comment.
Using std::vector here causes a heap allocation every time isConnectedByAbutment() is called. Since the number of pin boxes per pin is typically very small (usually 1 to 4), we can use boost::container::small_vector to keep the elements on the stack and avoid heap allocation overhead entirely.
boost::container::small_vector<std::pair<dbTechLayer*, Rect>, 8> first_pin_boxes;There was a problem hiding this comment.
Welcome to OpenROAD! Thanks for opening your first PR.
Before we review:
- Contribution Guide: https://openroad.readthedocs.io/en/latest/contrib/GettingInvolved.html
- Build Instructions: https://openroad.readthedocs.io/en/latest/user/Build.html
Please ensure:
- CI passes
- Code is properly formatted
- Tests are included where applicable
A maintainer will review shortly!
Use inline storage for up to eight pin boxes, following the existing small_vector usage in dbNet.cpp. Signed-off-by: Nigel Tan <nigeltanjc@gmail.com>
|
Checked on the reproduction from #11810: I applied this PR's With the fix, One small thing: |

Summary
Keep the routing layer with each pin rectangle in
dbNet::isConnectedByAbutmentand only accept intersections on the same layer.Type of Change
Impact
BLOCK pins that overlap in x and y on different metal layers are no longer treated as already connected. Nets with those pins remain eligible for routing. Same-layer overlap and edge contact still count as abutment.
Verification
The two regression cases fail on unchanged code and pass with the fix. All 42 tests across these six database targets pass:
bazelisk test --test_output=errors \ //src/odb/test/cpp:TestNetAbutment \ //src/odb/test/cpp:TestMaster \ //src/odb/test/cpp:TestChips \ //src/odb/test/cpp:TestDbSet \ //src/odb/test/cpp:TestModule \ //src/odb/test/cpp:TestNetTrackLocal validation used the pinned LLVM dependency with archive ownership restoration disabled for this container. Remote caching and build telemetry were disabled. A full OpenROAD application build and routing flow were not run.
Related Issues
Fixes #11810