-
Notifications
You must be signed in to change notification settings - Fork 55
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
expanded interface instance #230
Comments
Would you like to comment? |
Thank you for taking the time to explain your use case! The interface conversion wasn't designed with this usage in mind. Some interfaces can only be correctly converted via inlining, so I decided to inline always rather than maintaining two interface conversion strategies. I can imagine having it conditionally elaborate modports a series of ports instead (i.e. preserve the module hierarchy), but adding this alongside the existing implementation would be a significant undertaking. sv2v used to work this way in v0.0.5 and prior. You may want to give that a try in the mean time, though a lot has changed (and improved!) in the three years since. It may also be possible to handle this transformation within netlistsvg itself. Naively, this might entail some form of graph contraction: take all vertices |
This is something that I also want to see work without any workarounds. Great explanation of the problem michael! |
I am using
netlistsvg
to visualize mySystemVerilog
design after translating it toVerilog
withsv2v
. This works nice. However, when the design uses interfaces I have to use some workaround in order to hide details of modules in my visualization. I have added some toy example to describe what I am doing. What I would like to discuss is whether there is a better way to do it ...Toy example without interface instance
Details of module
foo
should be hidden in the overall visualization:In the top level module it will be used as some black box:
And this is exactly what is shown here:
Toy example with interface instance
In general modules will have lots of pins. For convenience I would like to use interfaces. So here I would define the interface as follows:
Here the adapted module
foo
Here the adapted top module
Because
sv2v
expands the interface instance the details offoo
show up:My workaround
In oder to use interfaces in my code but at the same time hide details in the visualization I write two versions for modules that use interfaces. In this case a "low level (ll)" module
foo_ll
:And a high level module
foo
which just connects the pins:With that details are still hidden in the visualization behind the low level module:
So this actually works for me but I wonder if something like this could be directly supported by
sv2v
.The text was updated successfully, but these errors were encountered: