Home / Learn Verilog / Debugging with Waveforms

Debugging with Waveforms

A systematic approach.

Bottom lineA systematic approach.

Breaking it down

Wave debugsymptomfirst wrong signalits inputsroot cause
Wave debug

What it is

Add signals, find the first wrong value, move backwards through the drivers until the cause is found.

Why it matters

Faster than guessing.

Mechanically speaking

Use markers, radix and hierarchy.

Shows up in

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

Find the bug in the waveformVerilog: edit and run

Read cnt and state: when does the machine leave state 1? What would you expect?

Check yourself

1. Debug direction?