Repository navigation
drt: restrict imported via figures to the GC context - #11698
MahmoudNedalSubLaban wants to merge 8 commits into
Conversation
Outer context can omit a connecting wire while retaining nearby via metal, producing false spacing markers outside a worker check region. Apply the same drcBox intersection filter used by routing workers before collecting markers. Add synthetic controls for connected metal, legal and illegal gaps, a shifted grid, and a real violation straddling a worker boundary. Exercise full and bounded checks with one and four threads. Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request updates TritonRoute's marker retrieval to filter out markers that do not intersect with the worker's DRC box, matching the ownership filter used when committing markers. It adds a getter for the DRC box in FlexGCWorker and introduces several integration tests to verify boundary behavior. Feedback suggests optimizing the intersection check order in TritonRoute.cpp to leverage short-circuit evaluation and avoid the overhead of calling the non-inline getDrcBox() function for non-intersecting markers.
Disable golden-log comparison for the assertion-based tests, matching their CMake registration. Keep log checks enabled for the existing DRT regressions. Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
|
Fixed the Bazel test registration in 1cd3cc7. All five new tests had reached Locally, the old flags reproduce all five failures and the corrected flags pass all five through |
Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
osamahammad21
left a comment
There was a problem hiding this comment.
Please use the gcTest.cpp for testing any GC functionality. The tcl tests are for testing the tcl APIs and interface only and they should be kept to minimum
| // Context shapes outside this worker's check region may be incomplete. | ||
| // Match the ownership filter used when routing workers commit markers. | ||
| if (!bbox.intersects(requiredDrcBox) | ||
| || !bbox.intersects(worker->getDrcBox())) { |
There was a problem hiding this comment.
How would that happen? I think the gcWorker shouldn't have markers that don't intersect with its DRC box.
There was a problem hiding this comment.
Addressed in 000496e: the five cases now use gcTest.cpp; their Tcl scripts/fixtures are removed.
I reproduced the out-of-region marker in connected_metal. initNetsFromDesign() queries extBox, and initRouteObj() imports all figures of a selected via. Here, extBox.xMin = 27400: the M3 landing reaches 27430, but the connecting M2 wire ends at 27360 and is omitted. The worker reports M2 box (27220,3160)-(27360,3230), outside its drcBox.xMin = 28900 (DBU).
addMarker() deduplicates without clipping. Routing applies the ownership filter later in FlexDRWorker::endAddMarkers(); this patch applies it to the checker collector too.
All ten new cases pass. Removing the filter fails only the two connected-metal cases; the real-gap and boundary controls remain passing.
There was a problem hiding this comment.
Thanks for checking. I reproduced this in gcTest.cpp: a worker imports a via but misses the connecting wire outside its extBox, creating a false spacing marker outside drcBox. addMarker() deduplicates markers without checking that boundary. The routing path applies this filter later; the patch adds the same check to the fresh-checker collector.
There was a problem hiding this comment.
I see, so the real problem seems to be in the DRC engine: a worker can report a violation outside its check region because it doesn’t have the full context there. Still, I’m not comfortable silently dropping those markers. My main concern is that getDRCMarkers isn’t only used for check_drc. repairPDNVias uses it too, so this change could alter physical output. I’m also not sure every real violation is guaranteed to be caught by the GC worker that owns its region.
In general, GC relies on later routing iterations to clean up incorrectly reported violations.
There was a problem hiding this comment.
Thanks, I agree that filtering the shared collector was too broad. It also left the question of whether another worker would catch a genuine violation unanswered.
I traced the reproducer to via geometry imported outside the worker’s context. The revised fix addresses that import and restores getDRCMarkers to its original behavior. It no longer discards reported markers based on worker ownership.
The connected-metal case now agrees with the full-context check, while the genuine-gap controls still report violations. I also exercised repairPDNVias through the C++ tests and checked the surviving vias and array cuts, rather than only checking marker counts. Its implementation is unchanged in this revision.
This addresses the reproduced input inconsistency without relying on a later routing iteration to remove the false marker.
Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
| // Context shapes outside this worker's check region may be incomplete. | ||
| // Match the ownership filter used when routing workers commit markers. | ||
| if (!bbox.intersects(requiredDrcBox) | ||
| || !bbox.intersects(worker->getDrcBox())) { |
There was a problem hiding this comment.
I see, so the real problem seems to be in the DRC engine: a worker can report a violation outside its check region because it doesn’t have the full context there. Still, I’m not comfortable silently dropping those markers. My main concern is that getDRCMarkers isn’t only used for check_drc. repairPDNVias uses it too, so this change could alter physical output. I’m also not sure every real violation is guaranteed to be caught by the GC worker that owns its region.
In general, GC relies on later routing iterations to clean up incorrectly reported violations.
The region query selects a via by its combined bounding box. Importing every figure can include a landing outside extBox while omitting its connecting wire, producing a false spacing marker. Check each transformed via figure against extBox and retain intersecting figures whole. Restore the marker collector and remove the worker-box accessor so reporting no longer depends on a marker ownership filter. Add GC boundary and parser-backed PDN repair coverage in gcTest.cpp, with no new Tcl tests. Keep the separate single-cut block-via repair issue out of this change. Fixes The-OpenROAD-Project#11697 Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
|
Hi @osamahammad21, I pushed the revised fix in 7afc9dc. I removed the filter from As requested, all new GC coverage is in Locally, 455 GC tests and 236 DRT/PDN CTest entries passed three runs. Bazel GC and TA tests also passed three runs with the CI warning checks enabled. CI is still pending, and the GitHub Actions runs show |
osamahammad21
left a comment
There was a problem hiding this comment.
Please don’t pull dst (and a full TritonRoute) into gcTest. This is a unit test for FlexGCWorker, and the fix lives in initRouteObj, so it can be tested on the existing fixture worker by setting extBox/drcBox around a via that sits on the boundary and checking the markers
Exercise the existing FlexGCWorker directly with extBox/drcBox boundary cases and raw marker assertions. Keep translated per-figure import coverage for both metal landings and cuts. Remove the full-router and parser harness, extra dst dependency, private friend access and io.h header export. Leave the production import guards and marker collector unchanged. Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
Merge upstream 1bcacf7, the base used by successful Jenkins PR-11698-merge build 25. The resulting source tree matches tested merge 619dd5b exactly. This replaces the obsolete sv-lang dependency path that failed archive checksum validation in the PR-head Docker builds. Do not change the DRT fix, fixture tests, or checksum validation. Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
|
Thank you for the guidance @osamahammad21 . I replaced the full-router harness with direct fixture-worker tests using extBox/drcBox and marker assertions, and removed the extra dependency and header changes. The production fix is unchanged, and local regression tests pass. |
Signed-off-by: Mahmoud Sub Laban <137659892+MahmoudNedalSubLaban@users.noreply.github.com>
|
Head build #8 passed. Merge build #27 failed in the Ubuntu 26.04 and Debian 12 Docker stages because downloading m4-1.4.18 from the GNU/kernel mirrors timed out before compilation. Could you please check CI mirror/cache access and rerun the merge job? The DRT fix and fixture tests are unchanged. Thank you. |
Summary
Fixes #11697.
The region query returns a whole via when its combined bounding box intersects a GC worker's
extBox. This can import a landing outside the context while omitting its connecting wire, creating a false spacing marker.The production fix checks each transformed metal/cut figure in
initRouteObj. Intersecting figures, including touching and crossing figures, are retained whole. The marker collector andrepairPDNViasimplementation are unchanged.Review revision
The tests now exercise the existing
GCFixtureworker directly, settingextBox/drcBoxand checking its markers. The full-router/parser harness, extradstdependency, private friend and header-export changes are removed.The complete PR changes only
FlexGC_init.cppandgcTest.cpp. No CMake or BUILD changes remain.Coverage includes both metal landings and transposed axes, the connected-metal reproducer, genuine and legal gaps, and exact translated metal/cut imports at outside, touching, crossing and contained positions.
Validation
These local results are for fixture revision
fc2a628280, before the upstream synchronization below.--config=ciand test-result caching disabled.One pre-existing disabled GC case is unchanged on the tested PR base. Counts include unit-test launchers and are not counts of independent physical designs. Hosted CI and maintainer review are still required; this is a reproduced checker-correctness fix, not a routing/PPA improvement claim.
Upstream synchronization
Commit
ee2cfd7b8cincorporates upstream base1bcacf76a0, the exact base used by successful Jenkins merge build 25. Its complete source tree is identical to that tested merge (619dd5bc64).This updates the old
sv-langdependency configuration that failed archive-checksum verification in the Docker stages of head build 6. The DRT fix and fixture tests are unchanged, and no checksum validation was bypassed. New commit-specific CI is pending.