Start Here
Optional Local Setup: Icarus Verilog and GTKWave
How to install Icarus Verilog and GTKWave locally, and the compile/run/view workflow behind every example in this tutorial — useful once you want a project outside the browser.
4 min read · Updated
You do not need a local install to follow this tutorial or the free course — every runnable example here compiles and simulates server-side in the playground. A local toolchain becomes useful once you want to work offline, script a build, or keep a project in your own repository.
This tutorial's own examples are compiled and simulated with Icarus Verilog, an open-source simulator. GTKWave is a companion waveform viewer for the VCD files Icarus can produce.
Installing Icarus Verilog
| Platform | Typical install |
|---|---|
| Debian/Ubuntu Linux | sudo apt-get install iverilog — this is exactly what this tutorial's own CI pipeline runs to compile the verified examples on this page's siblings, so it's confirmed working, not just documented |
| macOS (Homebrew) | brew install icarus-verilog. The Bison requirement applies when building Icarus from source with Xcode, not to the normal Homebrew-install command; if you take that source-build path, Icarus's guide says to install Bison 3 and put it on your PATH |
| Windows | The project's own install guide currently recommends MSYS2, which carries prebuilt Icarus Verilog and GTKWave packages together. A native installer from bleyer.org or scoop install iverilog also work, though the Scoop package can lag behind the latest release |
Confirm the install from a terminal:
iverilog -VThat should print a version banner, for example Icarus Verilog version 12.0 (...). If the command is not found, the install did not add iverilog to your shell's PATH.
The compile/run/view workflow
Icarus Verilog is two programs used together: iverilog compiles, vvp runs the compiled result.
iverilog -o sim.vvp design.v testbench.v
vvp sim.vvpdesign.v is the synthesizable module under test; testbench.v supplies stimulus and typically ends in $finish. If the testbench calls $dumpfile/$dumpvars, running sim.vvp also writes a .vcd waveform file in the current directory — see Reading Waveforms for how to interpret one.
Installing GTKWave
| Platform | Typical install |
|---|---|
| Debian/Ubuntu Linux | sudo apt-get install gtkwave |
| macOS | Do not rely on GTKWave's older packaged macOS build: its official documentation says it is incompatible with current macOS. Follow the current GTKWave macOS instructions: use its linked community Homebrew tap or build GTKWave 4 from source |
| Windows | Bundled with the MSYS2 or bleyer.org Icarus installs above, or a standalone installer from the GTKWave project page |
Open a generated waveform with:
gtkwave wave.vcdGTKWave opens with no signals shown by default — drag the modules and signals you want from the left-hand hierarchy pane into the waveform view.
Common setup mistakes
- Compiling without the testbench file.
iverilog -o sim.vvp design.valone has no stimulus and nothing to simulate; both files belong in oneiveriloginvocation unless you compile them to separate object files first. - No
$dumpfile/$dumpvarsin the testbench. Without both system tasks,vvpruns correctly but produces no.vcdfile for GTKWave to open. - Two modules named
tbcolliding when you concatenate files from different examples — Icarus reports a duplicate-module error, not a silent overwrite. - An outdated Bison while building Icarus from source on macOS. The normal
brew install icarus-verilogpath is separate. If you are following Icarus's source-build instructions with Xcode, install Bison 3 and put it onPATHas the official macOS guidance describes.
Where to go from here
Nothing on this page changes anything else in the tutorial: it exists for readers who want the same toolchain running on their own machine. What Is Verilog HDL? covers what a simulator and a synthesis tool each do; Where Verilog Fits in the Toolchain places Icarus among the broader set of tools you will encounter.
Sources and verification
- Icarus Verilog — official installation guide — Homebrew formula name, the source-build-only macOS Bison caveat, and the current Windows recommendation (MSYS2) all confirmed here, 2026-08.
- GTKWave — macOS install guide
- This tutorial's own CI installs Icarus via
apt-get install iverilogon Ubuntu runners (.github/workflows/ci.yml) to compile every verified example in this tutorial, which is a second, independent confirmation of the Linux command beyond the official docs.