-
Notifications
You must be signed in to change notification settings - Fork 539
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
cannot access package objects with vpi_handle_by_name() #1038
Comments
The code for vpi_handle_by_name() likely predates when packages were added so it will need some tweaking to handle them correctly. |
I think I have a fix for this, but I want to review it again tomorrow before I turn it in. It also allows you to find packages by name. They need to have Do you have any information regarding how other simulators work in this respect? For example does |
"pkg::var" works on xcelium, questa and vcs but makes riviera crash. Questa and xcelium can find "pkg::" while riviera and vcs return NULL. |
Close enough. I say go with Cary's solution.
…On Fri, Dec 29, 2023 at 3:41 AM Todd Strader ***@***.***> wrote:
"pkg::var" works on xcelium, questa and vcs but makes riviera crash.
Questa and xcelium can find "pkg::" while riviera and vcs return NULL.
—
Reply to this email directly, view it on GitHub
<#1038 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACKMXP4LVRFC4W4UI3TY3YL2T75AVCNFSM6AAAAAA77NEYVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRHE4DCNBXGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Steve Williams
***@***.*** ***@***.***>
|
Thanks for the comparison information. That confirms the implementation plan I'm following should be mostly portable. I still need to check escaped package identifiers work and would like to refactor the code a bit because it's slightly hackish even though it works correctly. For example I believe there is only a single package base and I've not looked at optimizing that along with my detection method for a package needs some more robustness if possible. I think an escaped module identifier that ends in :: would be considered a package so would not be search for in the module namespace, but it may be protected by the trailing space until after type detection. Just more test cases to add and confirm they work correctly. At the moment I am confirming you can access the scope by name and a single |
I tried both a
::
and.
delimiter (I believe the former to be the correct choice), but neither worked:yields:
However, iterating over objects in the package does work.
Related to:
cocotb/cocotb#3536
The text was updated successfully, but these errors were encountered: