Introduction to Verilator¶
Written by Wilson Snyder <wsnyder@wsnyder.org>, with Duane Galbi and Paul Wasson <pmwasson@gmail.com>.
Summary¶
Verilator is the fastest free Verilog HDL simulator. It compiles synthesizable Verilog (not test-bench code!), plus some PSL, SystemVerilog and Synthesis assertions into C++ or SystemC code. It is designed for large projects where fast simulation performance is of primary concern, and is especially well suited to generate executable models of CPUs for embedded software design teams.
Please do not download this program if you are expecting a full featured replacement for NC-Verilog, VCS or another commercial Verilog simulator or Verilog compiler for a little project! (Try Icarus instead.) Don't get it if you require a corporate support organization. However, if you are looking for a path to migrate synthesizable Verilog to C++ or SystemC, and writing just a touch of C code and Makefiles doesn't scare you off, this is the free Verilog compiler for you.
Verilator supports the synthesis subset of Verilog, plus initial statements, proper blocking/non-blocking assignments, functions, tasks, multi-dimensional arrays, and signed numbers. It also supports very simple assertions and coverage analysis. Verilator supports the more important Verilog 2001 constructs, with additional constructs and SystemVerilog support added as users request them.
Verilator has been used to simulate many very large multi-million gate designs with thousands of modules.
Performance¶
Verilator does not simply convert Verilog HDL to C++ or SystemC. Being a translator is fairly easy (and was what Verilator abandoned over 5 years ago). Instead rather than translate, Verilator compiles your code into a much faster optimized model, which is in turn wrapped inside a SystemC module. The results are a compiled Verilog model that executes over 10x faster than standalone SystemC.
Verilator is about 100 times faster than interpreted Verilog simulators such as Icarus Verilog. Verilator has about the same performance as the leading commercial Verilog simulators including Carbon, Modelsim, NC-Verilog, VCS, VTOC, and Pragmatic CVer/CVC, but is free, so you can spend on computes rather than licenses. Thus Verilator gives you more cycles/dollar than anything else available. (If you benchmark Verilator, please see the notes in the Verilator Manual and also let the author know the results; there may be additional tweaks possible.)
Here's how Verilator stacks up to some of the other commercial and free Verilog simulators:
See Also¶
Other Notable Open-Source Simulators¶
There are three other notable open source simulators. Hopefully if Verilator does not suit your needs one of the others may.
Icarus Verilog - Icarus is a full featured interpreted simulator. Recommended.
Verilog2Cpp - Compiled simulator no longer supported (to our knowledge)
VBS - Verilog Behavioral Simulator no longer supported (to our knowledge)
![[logo]](/img/veripool_small.gif)