How to show enumeration value of variable, rather than the bit vector value in ModelSim

112 Views Asked by At

I'm currently working on a final project for my Verilog course, which involves building a processor. As part of this project, I've created a state machine, and I'm trying to visualize the names of the states in the waveform window.

However, it seems to display the state values by default instead of their names. Could you advise on how I might adjust this to display state names instead?

This is how it looks in my Modelsim window:

waveform caputure

The names of the states are:

parameter T0=0, T1=1, T2=2, T3_reg_io=3, RB0_HLT=4, T3_mri=5, D0T4=6,
D0T5=7, D1T4=8, D1T5=9, D2T4=10, D2T5=11, D3T4=12;
1

There are 1 best solutions below

0
Qiu On

In Modelsim you can add FSM using the following steps:

  1. Use FSM recognition and FSM coverage options (+acc, +cover) during compilation,
  2. Use the -fsmdebug and -coverage options on the vsim command line.

Check ModelSim User's Manual for more details. Notice that using View > FSM list you can check all FSMs detected by ModelSim and add it to a wave.