Query parameters in simulation run
I want to access a Verilog parameter set during the verilator run with -G. The use case is that I replicate a module based on this parameter with a generate. Now at runtime I want to call a DPI function in those modules for each instantiated one, using svGetScopeFromName and svSetScope.
So the function I need is something like Verilated::parameterMap(). The only alternative seems to iterate over scopes gathered by scopeNameMap(), but that would require filtering out other scopes etc. A constructive approach seems more sensible, where I can generate the scope based on queried data.
What do you think?
I would be happy to implement it, if you think that is necessary too and after your guidance on function name etc.
#2 Updated by Stefan Wallentowitz almost 2 years ago
sorry for the noise. First, I found that I used it at the wrong position obviously. Then it did not have an effect and I got a bit into the code. The problem is that the parameters are constant and end up in a generator variable. They are therefore dead very early (stage 11). They don't seem to have the public attribute set and I need to dig deeper into that. Anyhow, I am not sure if its worth the effort or should be solved less elegantly in my surrounding infrastructure.
Putting it on hold and would be great to hear your opinion.
Also available in: Atom