GRT: Fix FastRoute blocked tracks computation - #11093
Merged
maliberty merged 14 commits intoAug 12, 2026
Merged
Conversation
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…justment fix Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
This reverts commit dd6e7b2. Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into grt-m1-congestion
…m li1 Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new helper function blockedTrackCount in FastRoute.cpp to calculate the number of blocked tracks by summing the covered length of disjoint intervals and rounding once, which prevents over-charging and non-monotonic behavior. It also updates several test outputs and configuration files to reflect these routing changes. The review feedback identifies a critical issue where a non-positive track_space could lead to a division-by-zero error in the new helper function, and suggests a safe guard check to prevent potential crashes.
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into grt-m1-congestion
Contributor
Author
|
I'm running a CI. I'll need to update some metrics. But it seems ok |
…ROAD into grt-m1-congestion
eder-matheus
approved these changes
Aug 10, 2026
…ROAD into grt-m1-congestion
jhkim-pii
approved these changes
Aug 12, 2026
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
The problem.
initBlockedIntervalsconverts blocked metal into a track count so it can reduce a gcell edge's capacity.horizontal_blocked_intervals_/vertical_blocked_intervals_areinterval_set<int>— sets of disjoint intervals — and the old code rounded up each interval separately:Every fragment therefore paid a full track's round-up, so the charge depended on how the blocked region happened to be fragmented, not on how much of it was covered. That makes it non-monotonic: deleting metal that bridged two fragments splits the span, both halves round up independently, and capacity drops even though less metal is blocking.
The fix. Sum the covered length across all intervals first, then round to tracks once:
The charge is now a function of coverage alone, so it can never rise when metal is removed. Extracted into
blockedTrackCount()and used by both the vertical and horizontal loops — the defect was symmetric and both are fixed. int64_t accumulation avoids overflow on wide spans.Scope. Removes the fragmentation artifact; still position-blind (it approximates blocked tracks as length/pitch rather than testing real track coordinates). Exact track counting remains the optional follow-up, which would need the per-layer track origin plumbed into FastRouteCore.
Type of Change
Impact
Properly adjust g-cell capacity. This mainly impacts Metal 1 resources.
Verification
./etc/Build.sh).Related Issues
#10273