Skip to content

GRT: fix resources update for back-to-back jumpers during repair antennas#10743

Merged
eder-matheus merged 7 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:grt-fix-resources-jumpers
Jun 24, 2026
Merged

GRT: fix resources update for back-to-back jumpers during repair antennas#10743
eder-matheus merged 7 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:grt-fix-resources-jumpers

Conversation

@jfgava

@jfgava jfgava commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

updateRouteGridsLayer now builds a new grids vector instead of modifying layers in place. When a promoted region begins or ends adjacent to an un-promoted point, it inserts an extra GPoint3D at the boundary position keeping the old layer, creating an explicit via-transition pair in the sttree.

Why this fixes the underflow:

Before the fix, after two adjacent jumpers (x=105→107 on l3→l5, then x=108→110 on l3→l5):

(107,l5) → (108,l5) ← same layer, treated as h-edge by releaseNetResources
→ decrements h_edge[5][148][107] which was never incremented → underflow

After the fix:

(107,l5) → (107,l3) → (108,l3) → (108,l5)
(107,l5)→(107,l3): layer change → skipped as via
(107,l3)→(108,l3): h-edge on l3 at x=107 → decremented correctly (was incremented when the net was originally routed on l3)
(108,l3)→(108,l5): layer change → skipped as via

The same via-transition is also inserted at the outer endpoints of each jumper (e.g. x=105 and x=110), which fixes a pre-existing minor leak on the approach/departure edges at those boundaries.

Type of Change

  • Bug fix

Impact

Properly update fast route resources after inserting back-to-back jumpers.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

Underflow issue

jfgava added 6 commits June 16, 2026 22:03
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
@jfgava jfgava self-assigned this Jun 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses an adjacent-jumper sttree underflow bug in global routing by modifying updateRouteGridsLayer in FastRoute.cpp to insert old-layer via-transition points at the boundaries of promoted regions, preventing back-to-back jumpers from merging. Additionally, it optimizes RepairAntennas.cpp by using emplace_back instead of push_back, adds a regression test for the bug, and updates the corresponding test metrics. The review feedback suggests replacing C-style casts with static_cast<int16_t> in the newly added code in FastRoute.cpp to align with modern C++ standards and improve type safety.

Comment thread src/grt/src/fastroute/src/FastRoute.cpp Outdated
Comment thread src/grt/src/fastroute/src/FastRoute.cpp Outdated
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
@jfgava jfgava marked this pull request as ready for review June 24, 2026 18:22
@jfgava jfgava requested review from a team as code owners June 24, 2026 18:22
@jfgava jfgava requested a review from eder-matheus June 24, 2026 18:22
@eder-matheus eder-matheus merged commit a584420 into The-OpenROAD-Project:master Jun 24, 2026
16 checks passed
@eder-matheus eder-matheus deleted the grt-fix-resources-jumpers branch June 24, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants