VPI hierarchy naming
I am currently looking into coupling cocotb and Verilator and stumbled over one major issue, that can be solved in a couple of ways. I am wondering what you think about it and suggest as most acceptable solution.
Everything that has public access currently becomes accessible by its scope. But the naming at runtime always involves the toplevel wrapper name (TOP by default), while cocotb operates on the full names in the actual verilog hierarchy. So, there are a couple of options:
1. Push it to cocotb and prepend the top name. This is not overly complex, but a bit cumbersome.
2. Change the hierarchy naming in Verilator entirely. This is a mess as it will break a lot of existing code.
3. Follow Verilog hierarchy naming in VPI. This seems to be the right place and has the least impact.
So, my proposal is to implement 3. I can do it as part of my effort and send as the first patch.
What do you think?
Also available in: Atom