Skip to content

Conversation

@em2machine
Copy link
Contributor

@em2machine em2machine commented Dec 18, 2025

As discussed at the end of #6754 I ended up piggybacking on the 'interface capture' work/PR that I had worked on before (this went a bit smoother than I anticipated). At a high level this means:

  1. Updates to V3LinkDotInterfaceCapture to be able to hold both nested class and interface typedefs - mainly a new addClass method, and the ability to disambiguate between 'CLASS' and 'IFACE'.
  2. In V3LinkDot added the 'ingress' point to add to V3LinkDotInterfaceCapture when a nested class typedef deferral needs to happen (just like the nested interface plumbing)
  3. V3Param has a couple targeted changes for the non-nested class typedef cases. These are different code paths (nested versus non-nested - directly in module instantiation) - this is: resolveDotToTypedef()
  4. Downstream iface capture plumbing directly does the typedef resolution - no changes needed. - O.o :)
  5. V3Broken needed a change to let the deferral case pass through, tried to still make this as tight as I could figure out.
  6. Added several tests, including the one that was referenced in the issue and one from quite some time ago.

This also has the happy consequence of solving a nested class issue that I opened a couple years ago... It was "Unlinked when getting bit width of type defined in parameterized class #4391". Added the test from that issue as t_mod_param_class_typedef7.v/py.

@wsnyder keeping this as draft if you can take an early look and see if you are ok with the direction and then I will finish cleaning it up. One thought I had was to now rename the V3LinkDotIfaceCapture to something like V3LinkDotDeferredCapture or something similar as it would now handle nested typedef deferrals for both interfaces and class.

@em2machine em2machine marked this pull request as draft December 18, 2025 11:14
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.

1 participant