LinuxCommandLibrary

verilator

Verilog to C++ simulation compiler

TLDR

Lint Verilog

$ verilator --lint-only [design.v]
copy
Compile to C++
$ verilator --cc [design.v]
copy
With testbench
$ verilator --cc [design.v] --exe [testbench.cpp]
copy
Build simulation
$ verilator --cc [design.v] --exe [tb.cpp] --build
copy
Generate waves
$ verilator --cc [design.v] --trace
copy

SYNOPSIS

verilator [--lint-only] [--cc] [--trace] [options] files

DESCRIPTION

verilator converts synthesizable Verilog and SystemVerilog designs into optimized C++ or SystemC models. The generated code compiles to native executables that run significantly faster than interpreted simulators, making it one of the fastest open-source Verilog simulators available.
The tool also functions as a lint checker with --lint-only, catching common coding errors and style issues without generating simulation code. Waveform tracing can be enabled with --trace to produce VCD files for viewing in waveform viewers like GTKWave.

PARAMETERS

--lint-only

Lint check only.
--cc
Generate C++.
--exe
Create executable.
--build
Compile output.
--trace
Enable waveforms.
-Wall
All warnings.

CAVEATS

Not full simulator. Cycle-based. Synthesizable subset.

HISTORY

Verilator was created by Wilson Snyder as the fastest Verilog simulator through C++ compilation.

SEE ALSO

iverilog(1), gtkwave(1), yosys(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community