Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vpiDefName 2 #3938

Closed
wants to merge 2 commits into from
Closed

Conversation

AndrewNolte
Copy link
Contributor

Reopen of #3931

@AndrewNolte AndrewNolte changed the title An/defname updated Add vpiDefName 2 Feb 5, 2023
@AndrewNolte
Copy link
Contributor Author

AndrewNolte commented Feb 5, 2023

So I fixed the tests but I still feel like it's a WIP. It won't break anything but it doesn't really implement the feature correctly bc of the ASTscopename visitor labelling things as modules, and not always getting the defname right. But from the failing tests it looks like something relied on those being "scope_other" even though they are modules, so getting it perfect may be tricky. I'm getting the incorrect names on a larger design so it could be hard to reproduce in a test.

@AndrewNolte AndrewNolte force-pushed the an/defname-updated branch 3 times, most recently from 236b866 to 5b9aa95 Compare February 6, 2023 20:21
@AndrewNolte
Copy link
Contributor Author

So I think I figured out why it gets those wrong, but not sure how to fix it. If a module doesn't have any public signals inside that direct layer, it doesn't get processed and put into m_vpiScopeCandidates via the AstCellInline or the AstScope visitors. And so it doesn't get the module name overwritten correctly in varHierarchyScopes. Do you think there's a low perf cost way to get these leaf modules to get "SCOPE_MODULE" and the defname correctly?

@wsnyder
Copy link
Member

wsnyder commented Feb 8, 2023

You mean to have all modules be included in vpiScopeCandidates? I think you should be able to add to that variable on each AstNodeModule visit.

BTW make sure you are up to date with master as I fixed a bug in that code a few days ago.

m_scopeNames.insert(std::make_pair(
scpSym, ScopeData{scpSym, scpPretty, 0, "SCOPE_OTHER"}));

if (varp->isSigUserRdPublic()) {
Copy link
Contributor Author

@AndrewNolte AndrewNolte Feb 10, 2023

Choose a reason for hiding this comment

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

So what was happening was it was only calling varHierarchyScopes on modules that had public signals in them, and so only copying over those orig names and SCOPE_MODULE types. Now this will call it on those, but not add any new scopes if they don't exist. I'm worried this may impact build times though by iterating through more signals, so I'd recommend benchmarking before merging. @wsnyder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually noticing quite a bit of build time impact, I'll change this so it just adds the modules and not a bunch of signals

@wsnyder
Copy link
Member

wsnyder commented May 6, 2023

@AndrewNolte might you have time to finish this off?

@wsnyder
Copy link
Member

wsnyder commented Apr 30, 2024

Closing due to age - @AndrewNolte if you get back to this please open a new pull request.

@wsnyder wsnyder closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants