VERILATOR(1)

πŸ’… VERILATOR πŸ’…

ok so bestie, this is the manual page for Verilator, from the User Contributed Perl Documentation section β€” yes it lives in the Perl docs section, no we're not going to explain that, just roll with it 🫢


✨ NAME ✨

Verilator β€” lint, compile and simulate SystemVerilog code using C++/SystemC

like… it lints it, it compiles it, it simulates it. the whole trinity. periodt πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe check on how you actually call it:

verilator --help
verilator --version
verilator --binary -j 0 [options] [source_files.v]... [opt_c_files.cpp/c/cc/a/o/so]
verilator --cc [options] [source_files.v]... [opt_c_files.cpp/c/cc/a/o/so]
verilator --sc [options] [source_files.v]... [opt_c_files.cpp/c/cc/a/o/so]
verilator --lint-only -Wall [source_files.v]...

ok notice how --binary, --cc and --sc all take [options] plus your [source_files.v]... plus optional C++ files that are .cpp/.c/.cc/.a/.o/.so β€” those are the "opt_c_files", like optional C files, not "optimal C files" (ngl i made that mistake too 😭). and yeah -j 0 is in the --binary line, iconic.


πŸ’– DESCRIPTION πŸ’–

ok so the "Verilator" package β€” that's the literal package name, quotes and all β€” converts all synthesizable designs, and many behavioral ones, from Verilog and SystemVerilog into a C++ or SystemC model. then, after you compile that model, you can execute it. slay πŸ’…

but here's the thing that makes Verilator not like the other girls: Verilator is not a traditional simulator, but a compiler. that's the whole personality. it's giving compiler energy, not simulator energy. no cap πŸ”₯

for documentation, go look at <https://verilator.org/verilator_doc.html> β€” that's the link, that's where the docs live, go get 'em πŸ¦‹


πŸ‘‘ ARGUMENT SUMMARY πŸ‘‘

this is just a short summary of the arguments you can pass to the "verilator" executable β€” like a little appetizer, not the full meal. for the detailed descriptions of these arguments, the manpage points you at <https://verilator.org/guide/latest/exe_verilator.html>. so if you want the whole story, that's the link bestie πŸ’–

the files you can hand it:

  • <file.v> β€” Verilog package, module, and top module filenames 🌸
  • <file.c/cc/cpp> β€” optional C++ files to compile in ✨
  • <file.a/o/so> β€” optional C++ files to link in πŸ”—

more parts follow, so don't go anywhere β€” we're literally just getting started πŸ’œ

...and the language-vibe extension options keep going, bestie ✨:

  • +1364-1995ext+<ext> β€” parse files with extension <ext> as Verilog 1995, periodt πŸ’…
  • +1364-2001ext+<ext> β€” same deal, but Verilog 2001
  • +1364-2005ext+<ext> β€” and Verilog 2005
  • +1800-2005ext+<ext> β€” switch that extension to SystemVerilog 2005 era
  • +1800-2009ext+<ext> β€” SystemVerilog 2009, she's evolved
  • +1800-2012ext+<ext> β€” SystemVerilog 2012, still iconic
  • +1800-2017ext+<ext> β€” SystemVerilog 2017, lowkey the standard one
  • +1800-2023ext+<ext> β€” SystemVerilog 2023, freshest of the fresh πŸ¦‹

Now the actual flags, alphabetically-ish, no skips:

  • --no-aslr β€” disable address space layout randomization. ASLR? not today πŸ’€
  • --no-assert β€” turn off all the assertions. every single one.
  • --no-assert-case β€” turn off just the unique/unique0/priority-case assertions, if you only want those gone
  • --assert-unroll-limit <iter> β€” the max number of SVA assertion repetitions before it gives up and errors out
  • --autoflush β€” flush streams after all the $displays run 🚿
  • --bbox-sys β€” blackbox any $system calls it doesn't recognize
  • --bbox-unsup β€” blackbox language features it doesn't support, so it doesn't ✨panic✨
  • --binary β€” build the model as a binary
  • --build β€” build the model executable/library after Verilation
  • --build-dep-bin <filename> β€” override which Verilator binary the build dependency uses
  • --build-jobs <jobs> β€” how much parallelism to throw at --build πŸ‘―
  • --cc β€” create C++ output
  • -CFLAGS <flags> β€” C++ compiler arguments that go in the makefile
  • --compiler <compiler-name> β€” tune everything for the C++ compiler you named
  • --compiler-include β€” stick an extra header into the precompiled one
  • --constraint-array-limit <size> β€” max array size for constraint array reduction
  • --converge-limit <loops> β€” tune how long convergence is allowed to settle, like letting the tea steep 🍡
  • --coverage β€” turn on all the coverage. the whole buffet 🌈
  • --coverage-branch β€” branch coverage
  • --coverage-expr β€” expression coverage
  • --coverage-expr-max <value> β€” max permutations it'll allow for a single expression
  • --coverage-fsm β€” FSM state/arc coverage
  • --coverage-fsm-expand <mode> β€” pick the mode for fsm arc expansion
  • --coverage-fsm-max-arcs <value> β€” cap on how many transitions an expanded FSM can have
  • --coverage-line β€” line coverage
  • --coverage-max-bins <value> β€” max bins for an integral coverpoint bins declaration
  • --coverage-max-real-bins <value> β€” same, but for a real coverpoint bins declaration
  • --coverage-max-width <width> β€” max array depth for coverage
  • --coverage-merge-instances β€” default covergroups to merge their instances πŸ«‚
  • --coverage-per-instance β€” per-instance coverage counters instead
  • --coverage-toggle β€” toggle coverage
  • --coverage-underscore β€” enable coverage of _signals
  • --coverage-user β€” enable SVL user coverage
  • -D<var>[=<value>] β€” set a preprocessor define
  • --debug β€” debugging mode ON
  • --debug-check β€” debugging assertions ON
  • --no-debug-leak β€” don't leak memory in --debug mode (yes, the leak is normally, like, a feature πŸ’€)
  • --debugi <level> β€” debugging at a specific level
  • --debugi-<srcfile> <level> β€” debugging for one specific source file at a level
  • --no-decoration β€” no comments, lower spacing level
  • --decorations <level> β€” set the output comment and spacing level
  • --default-language <lang> β€” which language to parse by default
  • +define+<var>=<value> β€” set a preprocessor define, plus-sign style
  • --diagnostics-sarif β€” turn on SARIF diagnostics output
  • --diagnostics-sarif-output <filename> β€” pick the SARIF diagnostics output file
  • --dpi-hdr-only β€” only cough up the DPI header file, nothing else
  • --dump-<srcfile> β€” dump everything from that source file
  • --dump-ast-patterns β€” dump Ast pattern statistics
  • --dump-defines β€” show preprocessor defines when you use -E
  • --dump-dfg β€” dump DfgGraphs to .dot files
  • --dump-dfg-patterns β€” dump Dfg pattern statistics
  • --dump-graph β€” dump V3Graphs to .dot files
  • --dump-inputs β€” dump the preprocessed input files
  • --dump-tree β€” dump Ast .tree files
  • --dump-tree-addrids β€” use short identifiers instead of addresses
  • --dump-tree-dot β€” dump Ast .tree.dot debug files
  • --dump-tree-json β€” dump Ast .tree.json files and a .tree.meta.json file
  • --dumpi-<srcfile> <level> β€” dump everything from that source file, at a level
  • --dumpi-dfg <level> β€” dump DfgGraphs to .dot files, at a level
  • --dumpi-graph <level> β€” dump V3Graphs to .dot files, at a level
  • --dumpi-tree <level> β€” dump Ast .tree files, at a level
  • --dumpi-tree-json <level> β€” dump Ast .tree.json files, at a level
  • -E β€” preprocess only, do NOT compile. she's just reading πŸ“–
  • --emit-accessors β€” emit getter and setter methods for the model's top class
  • --error-limit <value> β€” abort after this many errors
  • --exe β€” link it up to create an executable
  • --expand-limit <value> β€” set the expand optimization limit
  • -F <file> β€” parse arguments from a file, relatively (iykyk)
  • -f <file> β€” parse arguments from a file, non-relatively
  • -FI <file> β€” force include a file
  • --flatten β€” force-inline every module, task and function. no nesting, only vibes 🫢
  • --fourstate β€” turn on fourstate logic
  • --no-fourstate β€” turn it back off
  • --func-recursion-depth <value> β€” max recursion depth for constant functions
  • --future0 <option> β€” ignore an option for compatibility
  • --future1 <option> β€” ignore an option with an argument for compatibility
  • -fno-<optimization> β€” disable a specific internal optimization stage
  • -G<name>=<value> β€” overwrite a top-level parameter
  • --gate-stmts <value> β€” tune gate optimizer depth
  • --gdb β€” run Verilator under GDB, interactively πŸ›
  • --gdbbt β€” run Verilator under GDB just to get a backtrace
  • --generate-key β€” create a random key for --protect-key
  • --get-supported <feature> β€” ask whether a feature is supported
  • --getenv <var> β€” get an environment variable, with defaults
  • --help β€” show this help. hi, that's this πŸ‘‹
  • --hierarchical β€” turn on hierarchical Verilation
  • --hierarchical-block <block> β€” internal use only for --hierarchical
  • --hierarchical-child <block> β€” internal use only for --hierarchical
  • --hierarchical-params-file <name> β€” internal option that specifies the parameters file for hier blocks
  • --hierarchical-threads <threads> β€” number of threads for hierarchical scheduling
  • -I<dir> β€” a directory to search for includes
  • --if-depth <value> β€” tune the IFDEPTH warning
  • +incdir+<dir> β€” a directory to search for includes, plus-sign style
  • --inline-cfuncs <value> β€” inline CFuncs with <=value nodes (0=off)
  • --inline-cfuncs-product <value> β€” inline CFuncs if size*calls <= value
  • --inline-mult <value> β€” tune module inlining
  • --instr-count-dpi <value> β€” assumed dynamic instruction count of DPI imports
  • -j <jobs> β€” parallelism for --build-jobs/--verilate-jobs
  • --no-json-edit-nums β€” don't dump editNum in .tree.json files
  • --no-json-ids β€” don't use short identifiers instead of addresses/paths in .tree.json
  • --json-only β€” create JSON parser output only (.tree.json and .meta.json)
  • --json-only-meta-output <filename> β€” set the .tree.meta.json output filename
  • --json-only-output <filename> β€” set the .tree.json output filename
  • --l2-name <value> β€” the Verilog scope name of the top module
  • --language <lang> β€” the default language standard to parse
  • -LDFLAGS <flags> β€” linker pre-object arguments for the makefile
  • -libmap β€” specify the library mapping file
  • --lib-create <name> β€” create a DPI library
  • +libext+<ext>+[ext]... β€” extensions for finding modules
  • +librescan β€” ignored for compatibility (she's just here, being polite)
  • --lint-only β€” lint it, but make no output at all
  • --localize-max-size <value> β€” tune the localize optimization variable size
  • --main β€” generate a C++ main() file
  • --main-top-name β€” specify the top name passed to the Verilated model in the generated C++ main
  • --make <build-tool> β€” generate scripts for whichever build tool you name
  • -MAKEFLAGS <flags> β€” arguments to pass to make during --build
  • --max-num-width <value> β€” maximum number width (default: 64K)
  • --Mdir <directory> β€” name of the output object directory
  • --MMD β€” create .d dependency files
  • --mod-prefix <topname> β€” name to prepend to the lower classes
  • --MP β€” create phony dependency targets
  • +notimingchecks β€” ignored
  • -o <executable> β€” name of the final executable
  • -O0 β€” disable optimizations
  • -O1 β€” the default optimizations
  • -O2 β€” stronger optimizations
  • -O3 β€” high-performance optimizations πŸ”₯
  • -O<optimization-letter> β€” pick your own selectable optimizations, choose-your-own-adventure style
  • --output-groups <numfiles> β€” group .cpp files into bigger ones
  • --output-groups-size <bytes> β€” limit how big those grouped .cpp files can get
  • --output-split <statements> β€” split .cpp files into pieces
  • --output-split-cfuncs <statements> β€” split model functions
  • --output-split-ctrace <statements> β€” split tracing functions
  • -P β€” disable line numbers and blanks when using -E
  • --pins-bv <bits> β€” specify types for top-level ports
  • --pins-inout-enables β€” specify that __en and __out signals get created for inouts
  • --pins-sc-biguint β€” specify types for top-level ports
  • --pins-sc-uint β€” specify types for top-level ports
  • --pins-sc-uint-bool β€” specify types for top-level ports
  • --pins-uint8 β€” specify types for top-level ports
  • --no-pins64 β€” don't use uint64_t's for 33-64 bit sigs
  • --pipe-filter <command> β€” filter all input through a script 🌊
  • --prefix <topname> β€” name of the top-level class
  • --preproc-comments β€” include preprocessor comments in the output when using -E
  • --preproc-defines β€” include preprocessor defines in the output when using -E
  • --preproc-resolve β€” include all found modules in the output when using -E
  • --preproc-token-limit β€” maximum tokens on a line the preprocessor will allow
  • --private β€” debugging; see docs πŸ•΅οΈ
  • --prof-c β€” compile the C++ code with profiling
  • --prof-cfuncs β€” name functions for profiling
  • --prof-exec β€” generates an execution profile for the gantt chart πŸŽ€
  • --prof-pgo β€” generates profiling data for PGO πŸ”₯
  • --protect-ids β€” hashes identifier names for obscurity πŸ™ˆ
  • --protect-key <key> β€” the key used for symbol protection πŸ”‘
  • --protect-lib <name> β€” makes a DPI protected library πŸ’…
  • --public β€” marks signals as public; see docs πŸ“–
  • --public-depth <level> β€” marks public out to the specified module depth 🫧
  • --public-flat-rw β€” marks all variables, etc., as public_flat_rw
  • --public-ignore β€” ignores all public comment markings πŸ™ˆ
  • --public-params β€” marks all parameters as public_flat
  • -pvalue+<name>=<value> β€” overwrites a toplevel parameter ✍️
  • --quiet β€” minimizes additional printing 🀫
  • --quiet-build β€” doesn't print build progress
  • --quiet-exit β€” doesn't print the command on failure
  • --quiet-stats β€” doesn't print statistics
  • --relative-includes β€” resolves includes relative to the current file πŸ“‚
  • --reloop-limit <value> β€” minimum iterations for forming loops πŸ”
  • --replication-limit <value> β€” replication concatenation limit (default: 8k) πŸ“
  • --report-unoptflat β€” extra diagnostics for UNOPTFLAT 🩺
  • --rr β€” runs Verilator and records with rr ⏺️
  • --runtime-debug β€” enables model runtime debugging πŸ›
  • --savable β€” enables model save-restore πŸ’Ύ
  • --sc β€” creates SystemC output
  • --sched-zero-delay β€” specifies #0 delay support ⏱️
  • --no-skip-identical β€” disables skipping identical output
  • --stats β€” creates a statistics file πŸ“Š
  • --stats-vars β€” provides statistics on variables
  • --no-std β€” prevents loading standard files 🚫
  • --no-std-package β€” prevents parsing the standard package
  • --no-std-waiver β€” prevents parsing standard lint waivers
  • --no-stop-fail β€” does not call $stop when an assertion fails
  • -sv β€” enables SystemVerilog parsing ✨
  • +systemverilogext+<ext> β€” synonym for +1800-2023ext+<ext>
  • --threads <threads> β€” enables multithreading 🧡
  • --threads-dpi <mode> β€” enables multithreaded DPI
  • --threads-max-mtasks <mtasks> β€” tunes the maximum mtask partitioning
  • --timescale <timescale> β€” sets the default timescale ⏰
  • --timescale-override <timescale> β€” overrides all timescales 😀
  • --timing β€” enables timing support
  • --no-timing β€” disables timing support
  • --top <topname> β€” alias of --top-module πŸ‘―
  • --top-module <topname> β€” name of the top-level input module πŸ‘‘
  • --trace β€” enables VCD waveform creation 🌊
  • --trace-coverage β€” enables tracing of coverage
  • --trace-depth <levels> β€” depth of tracing
  • --trace-fst β€” enables FST waveform creation
  • --trace-max-array <depth> β€” maximum array depth for tracing
  • --trace-max-width <width> β€” maximum bit width for tracing
  • --trace-params β€” enables tracing of parameters
  • --trace-saif β€” enables SAIF file creation
  • --trace-structs β€” enables tracing structure names πŸ—οΈ
  • --no-trace-top β€” does not emit traces for signals in the top module generated by verilator
  • --trace-underscore β€” enables tracing of _ signals (the underscore ones πŸ‘€)
  • --trace-vcd β€” enables VCD waveform creation
  • -U<var> β€” undefines a preprocessor define
  • --no-unlimited-stack β€” doesn't disable the stack size limit πŸ“š
  • --unroll-count <loops> β€” tunes maximum loop iterations
  • --unroll-limit <loops> β€” maximum loop iterations before assuming an infinite loop πŸ’€
  • --unroll-stmts <stmts> β€” tunes maximum loop body size
  • --unused-regexp <regexp> β€” tunes UNUSED lint signals
  • -V β€” verbose version and config ℹ️
  • -v <filename> β€” Verilog library
  • --valgrind β€” runs Verilator under valgrind πŸ•΅οΈ
  • --no-verilate β€” skips Verilation and just compiles previously Verilated code ⏭️
  • --verilate-jobs β€” job threads for the Verilation stage
  • +verilog1995ext+<ext> β€” synonym for +1364-1995ext+<ext>
  • +verilog2001ext+<ext> β€” synonym for +1364-2001ext+<ext>
  • --version β€” shows program version and exits πŸ‘‹
  • --vpi β€” enables VPI compiles πŸ”Œ
  • --waiver-multiline β€” creates a multiline --match for waivers
  • --waiver-output <filename> β€” creates a waiver file based on linter warnings πŸ“
  • -Wall β€” enables all style warnings 🚨
  • -Werror-<message> β€” converts warnings to errors 😱
  • -Wfuture-<message> β€” disables unknown message warnings
  • -Wno-<message> β€” disables a warning
  • -Wno-context β€” disables source context on warnings
  • -Wno-fatal β€” disables fatal exit on warnings
  • -Wno-lint β€” disables all lint warnings
  • -Wno-style β€” disables all style warnings
  • -work <libname> β€” sets the config library for following files πŸ—‚οΈ
  • -Wpedantic β€” warns on compliance-test issues 🧐
  • -Wwarn-<message> β€” enables the specified warning message
  • -Wwarn-lint β€” enables the lint warning message
  • -Wwarn-style β€” enables the style warning message
  • --x-assign <mode> β€” assigns non-initial X's to this value ❌
  • --x-initial <mode> β€” assigns initial X's to this value
  • --x-initial-edge β€” enables initial X->0 and X->1 edge triggers ⚑
  • -y <dir> β€” directory to search for modules πŸ”

πŸŽ€ the runtime args (the ones your simulation eats) πŸŽ€

okay so this is a short summary of the simulation runtime arguments, i.e. the args for the final Verilated simulation runtime models. for the detailed description of these arguments, go look at <https://verilator.org/guide/latest/exe_verilator.html> β€” that's where the full tea is β˜•

  • +verilator+assert+lock β€” locks assertion status changes at startup πŸ”’
  • +verilator+coverage+file+<filename> β€” sets the coverage output filename
  • +verilator+debug β€” enables debugging 🐞
  • +verilator+debugi+<value> β€” enables debugging at a level
  • +verilator+error+limit+<value> β€” sets the error limit
  • +verilator+help β€” shows help πŸ™‹
  • +verilator+log+file+<filename> β€” logs stdout and stderr output to filename
  • +verilator+noassert β€” disables assert checking
  • +verilator+prof+exec+file+<filename> β€” sets the execution profile filename
  • +verilator+prof+exec+start+<value> β€” sets the execution profile starting point
  • +verilator+prof+exec+window+<value> β€” sets the execution profile duration
  • +verilator+prof+vlt+file+<filename> β€” sets the PGO profile filename
  • +verilator+quiet β€” minimizes additional printing 🀫
  • +verilator+rand+reset+<value> β€” sets the random reset technique 🎲
  • +verilator+rand+sampler+<name> β€” chooses what samples randomize() results
  • +verilator+seed+<value> β€” sets the random seed 🌱
  • +verilator+solver+file+<filename> β€” sets the random solver log filename
  • +verilator+V β€” shows verbose version and config
  • +verilator+version β€” shows version and exits πŸ‘‹
  • +verilator+vpi+<library>[:<bootstrap>] β€” loads the VPI shared library πŸ”Œ
  • +verilator+wno+unsatconstr+<value> β€” disables constraint warnings

🌈 DISTRIBUTION 🌈

the latest version lives at <https://verilator.org> β€” go get it bestie, it's free πŸ’–

Copyright 2003-2026 by Wilson Snyder. This program is free software; you can redistribute it and/or modify the Verilator internals under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. πŸ“œ

All Verilog and C++/SystemC code quoted within this documentation file are released as Creative Commons Public Domain (CC0). Many example files and test files are likewise released under CC0 into effectively the Public Domain as described in the files themselves. 🫢


πŸ‘€ SEE ALSO πŸ‘€

  • verilator_coverage
  • verilator_gantt
  • verilator_profcfunc
  • make
  • "verilator --help" β€” which is the source for this document πŸ“š
  • <https://verilator.org/verilator_doc.html> β€” for detailed documentation ✨

and that's the whole page, bestie!! you made it to the end, iconic behavior honestly πŸ’… go verilate something beautiful πŸ¦‹

this page is perl v5.44.0, dated 2026-11-01, and it's VERILATOR(1) β€” like a little time capsule in manpage form πŸŽ€ ngl that date is giving future main character energy fr fr 🌸
πŸ“¦ where this page comes from