Skip to content

dbSta: make get_nets glob patterns find hierarchical nets#10939

Open
oharboe wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:fix-get-nets-hier-glob
Open

dbSta: make get_nets glob patterns find hierarchical nets#10939
oharboe wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:fix-get-nets-hier-glob

Conversation

@oharboe

@oharboe oharboe commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

In a hierarchical netlist, get_nets with a wildcard returned nothing
for nets inside hierarchical instances while the exact same name
without a wildcard resolved, and get_pins/get_cells globs worked.

dbSdcNetwork::findNetsMatching1 matched patterns against top-scope net
names only. Hierarchical net names are module-local, so a pattern
containing a divider can never match. Split the pattern at the last
divider and search the scope of matching instances, mirroring
findPinsMatching; keep the top-scope scan for flat names that contain
dividers.

dbNetwork::findInstNetsMatching ignored non-top instances, which also
broke get_nets -hierarchical. Enumerate through netIterator; exact
lookups stay on findNet.

The get_nets1_hier test checks glob/exact agreement per scope, the
-hierarchical variants, and a get_pins control on the hier1.v fixture.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Øyvind Harboe oyvind.harboe@zylin.com

In a hierarchical netlist, get_nets with a wildcard returned nothing
for nets inside hierarchical instances while the exact same name
without a wildcard resolved, and get_pins/get_cells globs worked.

dbSdcNetwork::findNetsMatching1 matched patterns against top-scope net
names only. Hierarchical net names are module-local, so a pattern
containing a divider can never match. Split the pattern at the last
divider and search the scope of matching instances, mirroring
findPinsMatching; keep the top-scope scan for flat names that contain
dividers.

dbNetwork::findInstNetsMatching ignored non-top instances, which also
broke get_nets -hierarchical. Enumerate through netIterator; exact
lookups stay on findNet.

The get_nets1_hier test checks glob/exact agreement per scope, the
-hierarchical variants, and a get_pins control on the hier1.v fixture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe requested a review from a team as a code owner July 17, 2026 11:57
@oharboe
oharboe requested a review from dsengupta0628 July 17, 2026 11:57

@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 adds support for finding nets inside hierarchical instances using glob and exact matching. Specifically, dbNetwork::findInstNetsMatching was refactored to support any instance rather than being restricted to the top instance, and dbSdcNetwork::findNetsMatching1 was updated to handle hierarchical paths in net patterns. A new integration test get_nets1_hier was also added to verify these changes. There are no review comments, so no feedback is provided.

@oharboe

oharboe commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@dsengupta0628 @maliberty Heads up! I don't know what I'm doing here, but the use-case is to reduce Claude token usage...

This is a yak-shave by Claude because it spent a lot of time finding a signal and it thinks the root cause is this issue it fixed here.

The change was so small, that I think someone who knows what is going on here will be able to see if Claude is right here.

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