Skip to content

grt: fixes and optimizations on incremental CUGR#10797

Draft
eder-matheus wants to merge 9 commits into
The-OpenROAD-Project:masterfrom
eder-matheus:grt_cugr_incr_fix
Draft

grt: fixes and optimizations on incremental CUGR#10797
eder-matheus wants to merge 9 commits into
The-OpenROAD-Project:masterfrom
eder-matheus:grt_cugr_incr_fix

Conversation

@eder-matheus

Copy link
Copy Markdown
Member

Summary

Fix incremental-routing support to the CUGR global router so it works through the estimate_parasitics -global_routingupdateDirtyRoutes loop (repair_design/repair_timing). Reroute only dirty nets, patch only their routes/slacks/pin-access, and skip the global parasitics rebuild and congestion scan during incremental runs.

Type of Change

  • Bug fix
  • New feature

Impact

CUGR can now drive the incremental repair flow: it reroutes only the resizer/placer-modified nets and preserves untouched routes and slacks, fixing incorrect post-repair timing and cutting runtime. The default FastRoute path is unchanged (all new behavior is gated behind CUGR being selected).

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 signed my commits (DCO).

Related Issues

N/A

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…asitics rebuild

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…uting

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…uting

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
@eder-matheus eder-matheus requested a review from a team as a code owner July 1, 2026 21:45
@eder-matheus eder-matheus requested a review from jfgava July 1, 2026 21:45
@github-actions github-actions Bot added the size/M label Jul 1, 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 implements incremental routing support in the CUGR global router. It introduces an incremental routing mode that bypasses global parasitics re-estimation, global slack demotions, and full route rebuilding, focusing instead on rerouting only dirty nets and patching their routes and pin access points. The review feedback highlights several locations in CUGR.cpp where net_index is used to access the gr_nets_ vector without bounds checking, which could lead to out-of-bounds access. Adding bounds checks against gr_nets_.size() in these loops is recommended to prevent potential crashes.

Comment thread src/grt/src/cugr/src/CUGR.cpp
Comment thread src/grt/src/cugr/src/CUGR.cpp
Comment thread src/grt/src/cugr/src/CUGR.cpp
@eder-matheus

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10ee2a6986

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +673 to +675
patternRoute(net_indices);
net_indices = dirty_nets;
mazeRoute(net_indices);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve congestion recovery during incremental CUGR

For incremental CUGR runs where a dirty net is rerouted onto an already-full edge, this branch only reroutes the dirty set with pattern+maze and never recomputes the overflow set or reroutes neighboring nets sharing the congested edge; patternRoute/mazeRoute also suppress updateCongestedNets while incremental_routing_ is true. The previous routeIncremental added overflow nets back into the reroute set, so repair_timing/repair_design can now silently leave new global-route congestion until a full route is run.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a deliberate decision - CUGR shouldn't not touch nets outside of the dirty nets set in the incremental iterations. We plan to implement a mechanism similar to what FastRoute have, where in the case of congestion not solved, more nets are added to the dirty nets set in the GlobalRouter side, in order to have more control of what is being rerouted.

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
@eder-matheus eder-matheus marked this pull request as draft July 3, 2026 02:05
@eder-matheus

Copy link
Copy Markdown
Member Author

@jfgava FYI, I've turned it into a draft because a few more fixes are required. You don't need to review this PR yet.

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.

1 participant