Compiler and simulator

Install Verilator with the path that fits your platform.

Verilator turns Verilog or SystemVerilog into a compiled simulation flow. It is a strong first tool when you want fast lint-style feedback, batch simulation, and a clean path into waveform debugging.

Best for: compile + simulate Pair with: GTKWave Last verified: April 4, 2026
When to use it

Use Verilator when you want speed and structure.

  • Compile RTL into a fast simulation executable
  • Run lint-like checks before deeper verification work
  • Produce traces you can inspect in GTKWave
  • Script simulation in CI or agent workflows
Official doc shape

The Verilator docs show a simple Ubuntu package path, a git/source path for newer versions, and an official CMake flow for Windows builds with MSVC or Clang.

Install paths

Pick one install route per operating system.

Linux quick path

Use the distro package first

The official docs show a simple Ubuntu package install and note that distro packages can lag behind the latest release.

sudo apt-get install verilator

If you need a newer build than your distro ships, move to the official git/source path below.

macOS quick path

Use OSS CAD Suite for a packaged setup

For a fast macOS install, this portal recommends the official OSS CAD Suite bundle because it ships current tool binaries for macOS 12+ on Intel and Apple Silicon.

source <extracted_location>/oss-cad-suite/environment

If you want a standalone Verilator build instead, use the official git/source route or Windows-style CMake build notes as the advanced path.

Windows quick path

Use the official CMake + MSVC flow

The official CMake guide says Windows builds are the current supported CMake path. Install Python, CMake, Visual Studio or Clang, and WinFlexBison first.

cd verilator mkdir build cmake .. -DCMAKE_BUILD_TYPE=Release --install-prefix %cd%/../install cmake --build . --config Release cmake --install . --prefix %cd%/../install
Advanced path

Build the latest Verilator from git

The official install docs recommend the git/source route when you want the newest version instead of an older distro package.

git clone https://github.com/verilator/verilator cd verilator autoconf ./configure make -j"$(nproc)" sudo make install

On Ubuntu-class systems, the official docs also list the prerequisite packages before this step.

Verify and first command

Check that the tool answers and try one useful run.

verilator --version

Success looks like a version string printed without an error.

verilator --lint-only -Wall counter.sv

This is a good first command when you just want fast syntax and warning feedback.

Common pitfalls
  • Distro packages may lag behind the latest upstream release.
  • Windows builds need flex and bison available before CMake can finish.
  • If you want waveform viewing, install GTKWave too; Verilator notes it for FST tracing.
  • Make sure the installed binary is on `PATH` or set `VERILATOR_ROOT` for CMake-style installs.
Waveform tip

Verilator’s docs call out GTKWave as the tool to install if you want FST trace viewing. If your next step is debug, open the RTL lab page after this guide.

Copyright and license

This guide is a portal summary, not a mirrored manual. It paraphrases the official Verilator docs, credits the upstream project, and links you back to the official repo and license material for the full details.