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

Manage references to element imported from packages. #18

Open
suzizecat opened this issue Jan 15, 2025 · 0 comments
Open

Manage references to element imported from packages. #18

suzizecat opened this issue Jan 15, 2025 · 0 comments

Comments

@suzizecat
Copy link
Owner

suzizecat commented Jan 15, 2025

In order to support verification flow (and UVM) there is a need to support both

import my_pkg::* ;
import my_pkg::foo;

Those are managed by, respectively, WildcardImportSymbol and ExplicitImportSymbol.

Explicit import

Explicit import provides a link to the imported symbol. Hence it should be easy to get back the source range, find the undelying IndexSymbol and link.

As of today, the ExplicitImportSymbol is recorded as a new symbol and the local references are bound to it. This will need to be avoided.

Implicit import

Implicit import can lead to the imported (Slang) scope. It can probably be possible to visit this scope and add all symbols definitions to the using file...


As the package is also present from the top of the index structure, it should be possible to simply add the package name as a lookup location for symbols during the reference matching process.

This should be done on a per-file basis.

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

No branches or pull requests

1 participant