Advanced Waveform Tips - CMU-18240/240-How-to GitHub Wiki
See the 18-240 page Waveform Viewer for a refresher on the waveform viewer and some basic commands! The best way to get better with the waveform viewer is to use it. If you hover on a button, it should display text that tells you what it does. If you're still not sure, try it and find out!
It may be easier in some cases to recompile your code from within the waveform viewer without having to open it with a new executable compiled externally.
- Click Simulator → Rebuild and Start.
- In the popup window titled "Simulation Setup," check the "Custom command" option
- Enter your compilation command in the custom command box, which is likely of
the form:
vcs -sverilog -debug <filename>.sv
for 18-240 and some variant ofmake full
for 18-341. - Either use the "Browse" button or type the directory you wish this command to be run in. Ensure that the filenames/paths in step 3 are relative to this directory. (Usually you don't need to modify this.)
- Ensure the Action on OK option is set to "Rebuild and Start" and click "OK."
- You will receive compilation messages at the bottom of the primary DVE window (under the "DVE Console" tab). After compilation completes, you can execute the new simulation. Remember that if you made syntax errors etc. compilation will fail, errors will be reported in that tab. If you don't fix them you will of course not see an updated simulation.
You may find it irritating to have to close the waveform viewer, recompile your code, and read the signals you were looking at. Thankfully you can save the set of signals viewed on the waveform viewer to load later.
- On the waveform viewer window (not the DVE window with the individual panes), click File → Save Session.
- This will create a
.tcl
file. Name it to something appropriate and put it somewhere where you can find it later. - The next time you open up DVE (i.e. after recompiling), simply click File
→ Load Session, and open up that
.tcl
file you saved.
-
Find this option in the top menu bar.
-
Click on the drop down that says "Any Edge" and change it to "Value..."
-
You should get a pop-up window that says value search. Enter the value you're looking for. You can use verilog syntax like 'h1234 to specify a hex number. Click OK.
-
Click on the signal you're searching in the left bar of the main view. (See below.)
-
The
buttons now find the next and previous instances of this value. Click around to see different times it appears.

"Trace Drivers" means "My signal is doing the wrong thing, what is the SV/other signals that are causing it to do the wrong thing". Sometimes it works better than other times.
- Right click on a signal (in the left pane above, in the code, wherever). If you're interested in a specific time step set the time cursor first (pink line above).
- Click on "trace drivers". It will show the code that is driving this signal. You can click on signals in the code too and trace them.
What is this, GDB? More like... better GDB...
- Click Simulator → Breakpoints. You can also do things like right click a line of code and set a breakpoint there.
- You have a ton of options here including stopping at certain points in the code, on value changes, etc. You can even drag signals from the waveform viewer into the Breakpoints window. This can be especially useful for simulations that take a long time or loop infinitely. (You can always stop simulation prematurely with the red octagonal stop button too.)