Repository navigation
grt: add each via once to FastRoute partial routes - #12003
Merged
eder-matheus merged 4 commits intoOct 26, 2026
Merged
eder-matheus merged 4 commits into
eder-matheus merged 4 commits into
Conversation
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a helper function addSegment in FastRoute.cpp to deduplicate routing segments and refactors several insertion blocks to use it. It also adds unit tests in TestMaze3D.cpp to verify that vias are added only once. The review feedback suggests optimizing addSegment to avoid unconditional copying of segments on the hot path, and replacing std::minmax with std::min and std::max in the test helper to prevent potential dangling references.
… pin vias Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…er to getVias Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
jfgava
approved these changes
Oct 26, 2026
eder-matheus
enabled auto-merge
October 26, 2026 20:00
eder-matheus
disabled auto-merge
October 26, 2026 20:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GSegmentkeeps a via's layer order, so FastRoute's partial-route builders (getPlanarRoute,get3DRouteand the bridging vias) added the same via twice when it was reached from both sides. For example, a sink pin's via stack is walked down to the pin and back up.getRoutesalready skipped the reversed via; these paths did not. This PR addsaddSegment, which finds a duplicate via in either layer order, and uses it for every segment the partial-route builders add.Each duplicate became a parallel resistor in the mid-route parasitics that resistance-aware routing uses. OpenSTA's PRIMA
maxParasiticPathResistanceenumerates every simple path, so its runtime doubles with each duplicate on a path. This caused the asap7/swerv_wrapper GRT timeout in the ORFS nightly.Type of Change
Impact
4_cts.odb), parasitics estimated during the 3D maze pass went from 437,394 duplicate resistors on 86,549 of 87,431 nets (up to 203 per net) to none.global_routeon that design did not finish in 2.5 h without this fix and takes 72 s with it.getRoutes, which this PR doesn't change.Verification
./etc/Build.sh).Related Issues
ORFS nightly 7675: asap7/swerv_wrapper timed out in global route.