Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Industrial programming >> VHDL

How to View VHDL Variables in Modelsim During Simulation

How to see VHDL Variables on your simulation waveform

Modelsim has a way to view your VHDL variables during a simulation, but they do not make it easy to do. In Modelsim, the Objects window never displays variables.

Modelsim Objects Window, No Variables

Variables can be enabled by first showing processes. This is done by right clicking on the design that you want to view the variables for. Go down to Show, and check that Processes are being shown.

How to see your processes in your design

Once that is done, your design will show process names under it (which is one reason why it’s a good idea to label your processes).

Processes are Visible

Now you need to view Locals. A Variable is a Local because it does not exist out of the process in which it was created. It is local to one process. This is done in the View menu in Modelsim. Ensure that Locals is checked.

How to enable Locals in Modelsim

Now you should be able to see your Variables. Click on the process that created the variables that you want to look at. You should see all of the Variables that are local to that process show up in the Locals window. To see these Variables on your waveform window, click and drag them to the Modelsim Waveform window.

Variables Visible in Modelsim Locals Window

The final picture shows a waveform with varaibles in it. If you find yourself running the same simlulation over and over, try saving the waveform as a .do file so that you do not need to repeat these steps to add variables to your Modelsim waveform window in the future.

Variable Shown in Modelsim Waveform Window


VHDL

  1. Mastering Signed vs. Unsigned Types in VHDL: Practical Insights
  2. Mastering Xilinx Vivado: Integrated Logic Analyzer (ILA) & Virtual Input/Output (VIO) Debugging
  3. Implementing an AXI FIFO in Block RAM Using Ready/Valid Handshake
  4. Designing an FPGA‑Based RC Servo Controller with Precise PWM
  5. Exploring FPGAs: Applications, Benefits, and Getting Started with VHDL
  6. Leveraging Constants and Generic Maps in VHDL for Flexible Module Design
  7. Automate FPGA Development with Jenkins, Vivado, and GitHub on a Linux VPS
  8. Creating a Breathing LED Effect Using a Sine Wave from Block RAM
  9. VUnit 101: A Practical Guide to Automated VHDL Verification
  10. How to Build a Self‑Checking Testbench in VHDL – A Practical Guide