0
\$\begingroup\$

So for the first time, I created a SystemVerilog module and testbench in QuestaSim today. I created a project inside QuestaSim and then created a counter and a testbench for the counter.

When I compiled the design and ran the simulation, the simulation printed output was correct in the terminal but the counter module was not visible in the design hierarchy under the testbench. Also, the internal signals of the testbench were not showing.

I then created a VHDL version of the counter and the testbench. It compiled and executed fine. The internal signals of the VHDL testbench and the VHDL counter module were all visible in the object panel as expected. The SystemVerilog counter was visible as a module in the hierarchy of the VHDL testbench. However, the internal signals of it were not visible even now. See here, the register that stores the counter value is not visible:

enter image description here

I looked under compile properties for the SystemVerilog module expecting that something must be getting optimized away but the "Disable optimizations by using -O0" and "Use vopt flow" did not help:

enter image description here

What is the problem with QuestaSim and why does this only happen with SytemVerilog modules and not VHDL modules?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

The solution to this problem is under the "Optimization Options" that are applied to the simulation run when the simulation is initialized. The required option is "Apply full visibility to all modules"

enter image description here

With this being set, the missing signals become visible and when I run the SystemVerilog testbench, the SystemVerilog module under it is now visible with the signals as well.

enter image description here

enter image description here

I had assumed that maybe the QuestaSim simulation is corrupted. So I uninstalled and reinstalled it. However, the issue was simply with the vsim command where the +acc had to be set to full visibility.

It is not clear why the VHDL modules show full visiblity of signals by default regardless of what I choose here, but the SystemVerilog modules do not. It is not at all obvious why it should be like this. This has wasted some of my time but I am happy that I found the solution.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.