Home / Learn Verilog / How to Use the Built-in Simulator (Run, Edit, Waveform, Errors)
How to Use the Built-in Simulator (Run, Edit, Waveform, Errors)
Read the output panel: console, waveform, cursor, radix and error messages.
Theory in plain words
In plain terms
Every example has a Verilog editor and a result panel. Press Run (or Ctrl+Enter). The panel shows the top module, simulated time, console text from $display and a waveform of the signals.
Why we use it
You learn Verilog by changing code and watching what happens. Knowing how to read the output makes that fast.
Under the hood
The simulator picks the top module: a module named tb or test, otherwise the one nobody instantiates. Time starts at 0 and runs until $finish or until nothing is left to do.
Real-world use
- Every example in this course
- Quick experiments
- Teaching and demos
Try it: a counter and its waveform
Try: change "q + 1" to "q + 2", change the radix to binary, press Zoom +, move the mouse over the waveform.
What the controls do
| Control | Meaning |
|---|---|
| Show as hex/binary/decimal | how bus values are written |
| Zoom + / Zoom - | stretch the time axis |
| sub-module signals | also show signals inside instances (like c.q) |
| integers | show integer loop variables |
| Mouse over waveform | shows the value of every signal at that time |
| Reset button | restores the original example code |
Errors are your friend
Remove a semicolon in the example above and press Run. The panel shows the line number and what the parser expected. Fix it and run again.
Quick quiz
1. x in a waveform means...
x is an unknown value.
2. How do you stop a simulation in code?
$finish ends the simulation.