Verilator open-source SystemVerilog simulator and lint system
Go to file
2020-06-04 21:40:40 -04:00
.github Commentary 2020-04-29 18:42:28 -04:00
bin Fix error on UNPACKED in parser. (#1541) 2020-06-02 08:00:37 -04:00
ci Travis: Use workspaces and per job persistent ccache (#2399) 2020-06-03 21:10:13 +01:00
docs Add --dump-tree-addrids developer option 2020-05-31 20:21:55 +01:00
examples Fix some clang-tidy warnings 2020-06-01 23:16:17 -04:00
include Internals: Fix misc internal coverage holes. No functional change intended. 2020-06-04 19:49:39 -04:00
nodist Internals: Fix misc internal coverage holes. No functional change intended. 2020-06-04 21:40:40 -04:00
src Internals: Fix misc internal coverage holes. No functional change intended. 2020-06-04 21:40:40 -04:00
test_regress Tests: Tests to fix misc internal coverage holes. 2020-06-04 20:23:55 -04:00
.clang-format clang-format: Loops allowed on single line. 2020-04-13 17:44:19 -04:00
.clang-tidy Remove trailing spaces. 2019-08-08 17:53:49 -04:00
.codacy.yml Internals: Fix misc internal coverage holes. No functional change intended. 2020-06-04 21:40:40 -04:00
.gitattributes Add .gitattributes 2019-06-15 21:49:49 -04:00
.gitignore Add compile_commands.json to .gitignore (#2119) 2020-01-18 22:44:03 -05:00
.travis.yml Travis: Fix cron (always build focal) 2020-06-04 17:36:53 +01:00
Artistic docs: Move license files back to top out of docs to appease github. 2019-06-15 21:41:38 -04:00
Changes Line Coverage now tracks all statement lines, not just branch lines. 2020-05-31 15:52:17 -04:00
codecov.yml Add codecov.yml 2020-05-16 06:15:45 -04:00
configure.ac Configure now enables SystemC if it is installed as a system headers. 2020-05-28 18:51:46 -04:00
install-sh Fix whitespace issues, bug1203. 2017-09-11 19:18:58 -04:00
LICENSE docs: Move license files back to top out of docs to appease github. 2019-06-15 21:41:38 -04:00
Makefile.in Use clang-format 10.0.0 2020-04-28 18:47:59 -04:00
MANIFEST.SKIP Add codecov.yml 2020-05-16 06:15:45 -04:00
README.adoc Commentary 2020-05-16 18:53:18 -04:00
verilator-config-version.cmake.in Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilator-config.cmake.in Add OPT_GLOBAL to use for run-time library (#2373) 2020-05-27 01:52:08 +01:00
verilator.pc.in Fix default pkgconfig version to have no spaces (#2308) 2020-05-05 08:46:24 -04:00

// Github doesn't render images unless absolute URL
:!toc:

ifdef::env-github[]
image:https://img.shields.io/badge/License-LGPL%20v3-blue.svg[license LGPLv3,link=https://www.gnu.org/licenses/lgpl-3.0]
image:https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg[license Artistic-2.0,link=https://opensource.org/licenses/Artistic-2.0]
image:https://api.codacy.com/project/badge/Grade/fa78caa433c84a4ab9049c43e9debc6f[Code Quality,link=https://www.codacy.com/gh/verilator/verilator]
image:https://codecov.io/gh/verilator/verilator/branch/master/graph/badge.svg[Coverage,link=https://codecov.io/gh/verilator/verilator]
image:https://travis-ci.com/verilator/verilator.svg?branch=master[Build Status (Travis CI),link=https://travis-ci.com/verilator/verilator]
endif::[]

ifdef::env-github[]
:link_verilator_contributing: link:docs/CONTRIBUTING.adoc
:link_verilator_install: link:docs/install.adoc
endif::[]
ifndef::env-github[]
:link_verilator_contributing: https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.adoc
:link_verilator_install: https://verilator.org/install
endif::[]
:link_verilator_commercial_support: https://verilator.org/verilator_commercial_support

== Welcome to Verilator

[cols="a,a",indent=0,frame="none",grid="rows"]
|===
^.^| *Welcome to Verilator, the fastest Verilog/SystemVerilog simulator.*
+++ <br/> +++ &bullet; Accepts synthesizable Verilog or SystemVerilog
+++ <br/> +++ &bullet; Performs lint code-quality checks
+++ <br/> +++ &bullet; Compiles into multithreaded {cpp}, or SystemC
+++ <br/> +++ &bullet; Creates XML to front-end your own tools
<.^|image:https://www.veripool.org/img/verilator_256_200_min.png[Logo,256,200]

>.^|image:https://www.veripool.org/img/verilator_multithreaded_performance_bg-min.png[,388,178]
^.^| *Fast*
+++ <br/> +++ &bullet; Outperforms many commercial simulators
+++ <br/> +++ &bullet; Single- and multi-threaded output models

^.^| *Widely Used*
+++ <br/> +++ &bullet; Wide industry and academic deployment
+++ <br/> +++ &bullet; Out-of-the-box support from Arm, and RISC-V vendor IP
<.^|image:https://www.veripool.org/img/verilator_usage_400x200-min.png[,400,200]

>.^|image:https://www.veripool.org/img/verilator_community_400x125-min.png[,400,125]
^.^| *Community Driven & Openly Licensed*
+++ <br/> +++ &bullet; Guided by the https://chipsalliance.org/[CHIPS Alliance] and https://www.linuxfoundation.org/[Linux Foundation]
+++ <br/> +++ &bullet; Open, and free as in both speech and beer
+++ <br/> +++ &bullet; More simulation for your verification budget

^.^| *Commercial Support Available*
+++ <br/> +++ &bullet; Commercial support contracts
+++ <br/> +++ &bullet; Design support contracts
+++ <br/> +++ &bullet; Enhancement contracts
<.^|image:https://www.veripool.org/img/verilator_support_400x125-min.png[,400,125]

|===

== What Verilator Does

Verilator is invoked with parameters similar to GCC or Synopsys's VCS.  It
"Verilates" the specified Verilog or SystemVerilog code by
reading it, performing lint checks, and optionally inserting assertion
checks and coverage-analysis points.  It outputs single- or multi-threaded
.cpp and .h files, the "Verilated" code.

The user writes a little {cpp}/SystemC wrapper file, which instantiates the
"Verilated" model of the user's top level module.  These {cpp}/SystemC
files are then compiled by a {cpp} compiler (gcc/clang/MSVC++).  The
resulting executable performs the design simulation.  Verilator also
supports linking its generated libraries, optionally encrypted, into other
simulators.

Verilator may not be the best choice if you are expecting a full featured
replacement for NC-Verilog, VCS or another commercial Verilog simulator, or
if you are looking for a behavioral Verilog simulator e.g. for a quick
class project (we recommend http://iverilog.icarus.com[Icarus Verilog] for
this.)  However, if you are looking for a path to migrate SystemVerilog to
{cpp} or SystemC, or your team is comfortable writing just a touch of {cpp}
code, Verilator is the tool for you.

== Performance

Verilator does not simply convert Verilog HDL to {cpp} or SystemC.  Rather,
Verilator compiles your code into a much faster optimized and optionally
thread-partitioned model, which is in turn wrapped inside a
{cpp}/SystemC module.  The results are a compiled
Verilog model that executes even on a single-thread over 10x faster than
standalone SystemC, and on a single thread is about 100 times faster than
interpreted Verilog simulators such as http://iverilog.icarus.com[Icarus
Verilog]. Another 2-10x speedup might be gained from multithreading
(yielding 200-1000x total over interpreted simulators).

Verilator has typically similar or better performance versus the
closed-source Verilog simulators (Carbon Design Systems Carbonator,
Modelsim, Cadence Incisive/NC-Verilog, Synopsys VCS, VTOC, and Pragmatic
CVer/CVC). But, Verilator is open-sourced, so you can spend on computes
rather than licenses. Thus Verilator gives you the best cycles/dollar.

For more information on how Verilator stacks up to some of the other
closed-sourced and open-sourced Verilog simulators, see the
https://www.veripool.org/verilog_sim_benchmarks.html[Verilog Simulator
Benchmarks].  (If you benchmark Verilator, please see the notes in the
https://verilator.org/verilator_doc.pdf[Verilator manual (PDF)], and also
if possible post on the forums the results; there may be additional tweaks
possible.)

== Installation & Documentation

For more information:

* {link_verilator_install}[Verilator installation and package directory
  structure]

* https://verilator.org/verilator_doc.html[Verilator manual (HTML)],
or https://verilator.org/verilator_doc.pdf[Verilator manual (PDF)]

* https://github.com/verilator/verilator-announce[Subscribe to verilator announcements]

* https://verilator.org/forum[Verilator forum]

* https://verilator.org/issues[Verilator issues]

== Support

Verilator is a community project, guided by the
https://chipsalliance.org/[CHIPS Alliance] under the
https://www.linuxfoundation.org/[Linux Foundation].

We appreciate and welcome your contributions in whatever form; please see
{link_verilator_contributing}[Contributing to Verilator].  Thanks to our
https://verilator.org/verilator_doc.html#CONTRIBUTORS[Contributors and
Sponsors].

Verilator also supports and encourages commercial support models and
organizations; please see {link_verilator_commercial_support}[Verilator
Commercial Support].

== Related Projects

* http://gtkwave.sourceforge.net/[GTKwave] - Waveform viewer for Verilator
traces.

* http://iverilog.icarus.com[Icarus Verilog] - Icarus is a full featured
interpreted Verilog simulator. If Verilator does not support your needs,
perhaps Icarus may.

== Open License

Verilator is Copyright 2003-2020 by Wilson Snyder.  (Report bugs to
https://verilator.org/issues[Verilator Issues].)

Verilator is free software; you can redistribute it and/or modify it under
the terms of either the GNU Lesser General Public License Version 3 or the
Perl Artistic License Version 2.0.  See the documentation for more
details.