Skip to content

grt/cugr: support pins above the max routing layer - #11206

Merged
eder-matheus merged 2 commits into
The-OpenROAD-Project:masterfrom
eder-matheus:grt_cugr_pins_above_max_layer
Aug 21, 2026
Merged

grt/cugr: support pins above the max routing layer#11206
eder-matheus merged 2 commits into
The-OpenROAD-Project:masterfrom
eder-matheus:grt_cugr_pins_above_max_layer

Conversation

@eder-matheus

Copy link
Copy Markdown
Member

Summary

global_route -use_cugr aborted (SIGABRT) when a net had a pin above the max
routing layer (bumps, top-metal ports): CUGR's layer universe stops at the
ceiling but pin shapes did not, so selectShapeAccessPoint indexed
layer_directions_ out of bounds. FastRoute routes these designs, so:

  • Design::makeNetPins: clamp pin shapes to the top routable layer (plus the
    ROUTING filter the iterm loop already had).
  • updatePinAccessPoints: keep a top-metal pin's real connection layer, so
    connectTopLevelPins still stacks the vias above the ceiling.
  • CUGR::buildTreeFromRoute: clamp above-ceiling vias instead of rejecting the
    tree, so post-DRT adoption doesn't force a reroute.

Type of Change

  • Bug fix

Impact

These designs now route with -use_cugr, with guides matching the FastRoute
baseline. All changed paths are CUGR-only and were unreachable before (the
abort was unconditional), so nothing previously working changes.

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

None.

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 August 21, 2026 17:49
@eder-matheus
eder-matheus requested a review from jfgava August 21, 2026 17:49
@eder-matheus

Copy link
Copy Markdown
Member Author

@codex review

@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 issues where pins sitting above the maximum routing layer would cause CUGR global routing to abort or fail. It introduces layer clamping for pins and vias above the ceiling, ensuring that top-metal pins retain their real layers for proper via stacking while preventing out-of-bounds layer indices. Additionally, a potential null pointer dereference was identified in Design.cpp where bpin_box->getTechLayer() is called without checking if the returned pointer is null.

Comment thread src/grt/src/cugr/src/Design.cpp

@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: 8dd3991d6a

ℹ️ 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 thread src/grt/src/GlobalRouter.cpp
@eder-matheus
eder-matheus enabled auto-merge August 21, 2026 19:37
@eder-matheus
eder-matheus merged commit 73d0aff into The-OpenROAD-Project:master Aug 21, 2026
17 checks passed
@eder-matheus
eder-matheus deleted the grt_cugr_pins_above_max_layer branch August 21, 2026 19:39
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