Waveform Viewer - CMU-18240/240-How-to GitHub Wiki

The waveform viewer is an extremely useful tool for debugging your design. While you may be tempted to rely solely on $display statements for debugging, it cannot be stressed enough that you should use the waveform for debugging. It may not be absolutely necessary for extremely simple designs, but once you get to more complex ones with many signals you should use the waveform.

If you find yourself stuck when debugging, and you haven't tried the waveform viewer you should try the waveform viewer. Otherwise you won't get much sympathy from the TAs.

It is worth noting that if you are SSHing then you will need to set up X11 forwarding.

Starting the waveform viewer

Compile with the debug flag

vcs -sverilog -debug <filename>.sv

Execute with the -gui flag

./simv -gui &

To compile and start the waveform viewer:

vcs -sverilog -gui -R <filename>.sv

This starts up a GUI interface to the simulator, known as DVE (Discovery Visual Environment).

DVE Waveform

Hierarchy Pane

  • Shows the different modules of your design and how they are nested within each other
  • Expand by clicking the little plus sign
  • Select a module by clicking on it

Data

  • Shows the names and types of all signals defined in a selected module
  • Highlight multiple signals by holding the CTRL key
  • Highlight all signals with CTRL+A

Source Pane

  • Displays SystemVerilog file
  • Expand modules by clicking the little plus sign
  • This is not a text editor. You can’t change your SystemVerilog file in this window

Console Pane

  • Displays simulation output
  • You can run the simulation in any of the following ways:
    • Click Simulator β†’ Start/Continue
    • Press F5
    • Press the blue down arrow in the top left corner

Waveform simulation

Generating the signal waveform

  1. Highlight the signals in the Data Pane that you want displayed.
  2. Click Signal (or right click in data pane) β†’ Add to Waves β†’ New Wave View
  3. Run the simulation in any of the mentioned three ways

Additional notes

  • To add more signals to the Wave View, highlight the desired signals and right click β†’ Add to Waves β†’ Add to Wave #
  • To add all the signals in a module to the Wave View (for example, add all the signals in the DUT) you can right click on the module and add to waves (this is no different than selecting all the signals, but it's a bit faster.)
  • Zoom in and out on the waveform by holding the CTRL key and using the +/- keys or use the 2 and 1/2 scale buttons to zoom in and out by factors of 2.
  • For multibit signals, you can change the display from hex to decimal by right clicking the signal β†’ Set Radix β†’ Decimal. Note that the "Decimal" radix is signed, so if you want unsigned you should set the radix to "Unsigned".
  • To edit SystemVerilog in the Waveform Viewer, right click in the Source Pane β†’ Edit Source and a separate terminal window will open up your sv file.
⚠️ **GitHub.com Fallback** ⚠️