dpl: error on rows with overlapping sites (STEP < site width) - #11211
dpl: error on rows with overlapping sites (STEP < site width)#11211qwertxzy wants to merge 2 commits into
Conversation
A DEF row whose STEP (site spacing) is smaller than the site width declares overlapping sites, so the row's site count exceeds the grid DPL derives from the core area. dpl::Grid::markHopeless() then wrote past the pixel grid and crashed with Signal 11. examineRows() now reports DPL-0052 in this case instead of allowing the overflow, and a minimal row_site_mismatch regression test covers the degenerate floorplan (STEP 140 vs site width 380). Signed-off-by: qwertxzy <leo@qwertxzy.me>
There was a problem hiding this comment.
Code Review
This pull request introduces a check in Grid::examineRows to detect rows with site spacing smaller than the site width, preventing a potential pixel grid overflow and segmentation fault during detailed placement. It also adds a corresponding regression test. The review feedback suggests refining this check by ensuring the row has more than one site before flagging an error, which prevents false positives on valid designs with single-site rows where spacing might default to zero.
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/contributing.html
- Build Instructions: https://openroad.readthedocs.io/en/latest/contrib/BuildWithCMake.html
Please ensure:
- CI passes
- Code is properly formatted
- Tests are included where applicable
A maintainer will review shortly!
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Leo <qwertxzy@users.noreply.github.com>
|
|
|
I don't understand your description. STEP is about row height and has nothing to do with site width. Did you mean site height? Rows for a single site should not overlap and that should just be an error. |
|
Agreed, it should just be an error, that's what I'm aiming to fix. On a malformed DEF input, the row's horizontal STEP is smaller than the site width, so the declared sites overlap and the row ends up with more sites than the core area can hold at full site width. DPL sizes the placement grid from core-width / site-width but trusts the row's site count, so |
|
I guess this is unrelated: |
Summary
A DEF row whose
STEP(site spacing) is smaller than the site width declares overlapping sites, so the row's site count exceeds the grid DPL derives from the core area.dpl::Grid::markHopeless()then wrote past the pixel grid and crashed with Signal 11.Grid::examineRows()now reportsDPL-0052in this case instead of allowing the overflow, and a minimalrow_site_mismatchregression test covers the degenerate floorplan (STEP 140 vs site width 380).Type of Change
Impact
Previously, reading a DEF containing such a row crashed OpenROAD with a segfault during detailed placement. Now
detailed_placementaborts cleanly with theDPL-0052error, and the new row_site_mismatch` test pins this behavior.Verification
Related Issues
None.
Disclaimer
This was fixed by Deepseek v4.