Verilator
Verilator is an open-source tool for simulating and verifying hardware designs written in Verilog and SystemVerilog, converting them into high-performance C++ or SystemC models that enable cycle-accurate, multithreaded simulations up to 1000 times faster than traditional event-driven simulators.[1] Developed as a free alternative to commercial tools, it performs comprehensive linting, assertion checking, and coverage analysis during compilation, outputting single- or multithreaded executables that integrate with standard C++ compilers like GCC, Clang, or MSVC++.[1] Licensed under the GNU Lesser General Public License v3.0 or the Perl Artistic License 2.0, Verilator is widely used in industry and academia for verifying complex designs, including Arm and RISC-V intellectual property. As of August 2025, the project continues active development under the CHIPS Alliance, with version 5.040 incorporating IEEE 1800-2023 support and advanced UVM features.[2][1] Key features of Verilator include support for advanced SystemVerilog constructs such as classes, interfaces, and clocking blocks, as well as direct interfacing with C++ via the DPI (Direct Programming Interface) for cosimulation. It excels in performance benchmarks, achieving 10 times the speed of standalone SystemC simulations and comparable results to proprietary tools like Synopsys VCS or Mentor Graphics ModelSim for large-scale designs.[1] However, it has limitations, such as not supporting SDF (Standard Delay Format) annotations, mixed-signal simulations, or VHDL, making it best suited for digital logic verification rather than full-system modeling or rapid prototyping tasks where tools like Icarus Verilog may be more appropriate.[1]Introduction
Description and Purpose
Verilator is an open-source tool that compiles synthesizable Verilog and SystemVerilog designs into cycle-accurate C++ or SystemC models for high-performance simulation.[3] It originated as a development effort at Digital Equipment Corporation in 1994.[4] The core purpose of Verilator is to enable fast behavioral simulation by generating executable C++ code from hardware description languages (HDL), rather than interpreting the HDL directly, which results in simulation speeds comparable to or exceeding those of commercial tools like ModelSim or Cadence Incisive.[1][3] This approach leverages the efficiency of compiled C++ execution to handle complex designs at high throughput, making it particularly effective for cycle-accurate modeling without the overhead of traditional event-driven simulation.[1] Key benefits of Verilator include its cost-free nature, with no licensing fees required for use, integrated linting capabilities to enforce code quality and detect potential issues early, support for large-scale designs through comprehensive static analysis, and applicability to regression testing suites as well as early-stage firmware co-development.[3][1] These features position it as a versatile option for hardware verification workflows in both academic and industrial settings.[1] In operation, Verilator takes input HDL files, processes them through parsing and optimization stages, and outputs corresponding .cpp and .h files representing the simulated model.[3] Users must then provide a custom C++ wrapper, including a main() function, to instantiate and drive the model, after which the entire setup is compiled into an executable for running simulations.[3]Licensing and Development
Verilator is distributed under a dual licensing model, allowing users flexibility in integration and redistribution. The primary license is the GNU Lesser General Public License (LGPL) version 3.0, which permits linking Verilator-generated code with proprietary software while requiring that modifications to Verilator itself remain open-source. Alternatively, the Perl Artistic License 2.0 provides a more permissive option for redistribution and modification without copyleft restrictions.[1][5] The project was initiated and is primarily maintained by Wilson Snyder, who has led its development since 2001 through the Veripool organization. Contributions come from a broad community, including key individuals such as Todd Strader and Geza Lore, as well as recent support from Antmicro Ltd., which has enhanced features like SystemVerilog compliance and performance optimizations. Over 700 contributors have participated, with the project now guided by the CHIPS Alliance under the Linux Foundation to foster collaborative advancement.[6][1][7] Development occurs openly on GitHub at the verilator/verilator repository, where issues, pull requests, and releases are managed. Announcements, including new versions and significant updates, are shared via the dedicated verilator-announce repository. Commercial support is available through Veripool and partners like Antmicro, Embecosm, and others, enabling enterprise users to access customized assistance and integration services.[7][8][9] Verilator supports multiple platforms, with primary development and testing on Linux distributions like Ubuntu, alongside compatibility for FreeBSD and Apple macOS. On Windows, it runs via the Windows Subsystem for Linux (WSL) or Cygwin environments. Building Verilator requires a C++11-compliant compiler or later, such as GCC, Clang, or MSVC++.[10][11] Its open-source nature has enabled wide adoption in both academia and industry for hardware verification tasks.[1]History
Origins and Early Development
Verilator originated in 1994 at Digital Equipment Corporation (DEC), where it was conceived by Paul Wasson in the Core Logic Group as an internal tool to accelerate Verilog simulation by translating hardware descriptions into C code.[6] This initial development focused on integrating the generated C models with a custom Alpha processor simulator via the CCLI interface, enabling faster evaluation of Verilog designs compared to traditional event-driven simulators.[6] By 1995, the tool was actively used within DEC for multimedia and network processor projects, with performance enhancements contributed by Duane Galbi, who optimized the code generation and simulation shell.[6] These early efforts addressed the need for high-speed simulation in complex digital designs, laying the groundwork for Verilator's core approach of compiling rather than interpreting hardware behavior.[12] In 1998, shortly before DEC's acquisition by Compaq, Verilator was open-sourced, with Duane Galbi facilitating the public release under a license prohibiting resale but compatible with the GNU Public License.[13] The initial open-source versions emphasized basic Verilog-to-C translation, providing significant performance gains—often orders of magnitude faster than event-driven simulators—by generating optimized C models that executed directly on host CPUs.[6] This release marked a shift from proprietary use at DEC to broader accessibility, though the tool retained its focus on synthesizable Verilog subsets without full behavioral modeling support.[12] In the years immediately following open-sourcing, Verilator's maintenance was adopted by Veripool in 2001, with Wilson Snyder leading enhancements that included the addition of SystemC output mode in Verilator 2.0.[6] By 2002, a complete rewrite in C++ for version 3.000 delivered 2-5x performance improvements through better code generation and support for features like blocking and non-blocking assignments.[12] Early post-1998 developments also introduced basic linting capabilities, with warnings for issues such as undefined states and unused signals appearing in versions around 2001-2002, aiding design verification.[2] In 2009, support for SystemVerilog features and the Direct Programming Interface (DPI) was added, expanding compatibility for more advanced verification tasks.[12] By the mid-2000s, support for a subset of SystemVerilog features, including basic data types and assertions, was integrated, expanding compatibility while maintaining the tool's emphasis on simulation acceleration.[12] A key challenge during this early phase was ensuring cycle-accuracy without relying on full behavioral interpretation or dynamic event queues, which led to the adoption of static scheduling assumptions.[14] Under this approach, Verilator evaluated all combinational and sequential logic in a fixed order each clock cycle, assuming predetermined sensitivities to achieve precise timing while enabling high-speed compilation to C++.[6] This static model traded some flexibility for substantial performance benefits, influencing the tool's design philosophy from its inception at DEC through the open-source era.[12] In 2019, Verilator joined the CHIPS Alliance under the Linux Foundation, which facilitated contributions from over 700 developers, including significant efforts from Antmicro, Western Digital, Google, and Intel.[12]Major Milestones and Releases
Verilator's major milestones from 2010 onward reflect a steady progression in performance, compatibility, and feature depth, with key releases introducing foundational changes that built upon its early DEC origins. Version 3.900, released on January 15, 2017, marked a pivotal internal refactoring effort to enhance overall compatibility and establish groundwork for future performance improvements, including support for old-style$display($time) and fixes for parsing sensitivities with &&.[2] This release emphasized stabilizing the tool's core for broader adoption in SystemVerilog environments.
Subsequent versions in the 4.x series expanded simulation capabilities and optimization techniques. Version 4.002, released on September 16, 2018, introduced multithreaded model generation, runtime arguments, and LXT2 waveform tracing compatible with GTKWave, alongside optimizations for large always blocks and verilation performance.[2] Building on this, version 4.100, released on September 7, 2020, mandated C++11 and SystemC 2.3.0 or later, while adding hierarchical verilation for modular designs and support for class extern/extends, $urandom, and assume properties to advance IEEE SystemVerilog compliance.[2] Version 4.200, released on March 12, 2021, introduced the VerilatedContext class for simulating multiple independent models simultaneously, improving usability and integration, with documentation migrated to reStructuredText and fixes for interface array connections.[2] Later, version 4.224, released on June 19, 2022, enabled parallelized VCD tracing via the --threads option and added -f<optimization> flags for conditional merging, further boosting runtime efficiency.[2]
The transition to the 5.x series in 2022 represented a major leap in standards adherence and advanced features. Version 5.002, released on October 29, 2022, required C++20 and incorporated active/NBA scheduling, timing controls, forks/joins, and a new dataflow graph (DFG) optimizer for combinational logic, while enhancing memory usage and fixing struct pattern assignments.[2] In 2023, initial open-source support for UVM testbenches was added, enabling better integration with Universal Verification Methodology workflows.[15] The 5.x series from 2023 to 2025 delivered progressive enhancements, including named properties, abstract syntax tree (AST) improvements, expanded error checking, and profiling tools; notable releases encompassed version 5.030 on October 27, 2024, with -output-groups for concatenated C++ files and IEEE-compliant intra-assign delays, culminating in version 5.042 on November 2, 2025, which added support for modports referencing clocking blocks (building on clocking block support from earlier 5.x releases) and further optimizations including for SystemVerilog assertions.[2]
Over this period, Verilator's evolution trended toward full IEEE SystemVerilog compliance, integration of UVM-SystemC for verification, and seamless compatibility with open-source hardware description flows like Chisel, enabling more robust and scalable hardware simulation workflows.[2]
Technical Architecture
Design Flattening and Compilation Process
Verilator begins its processing by parsing input hardware description language (HDL) files, such as SystemVerilog, using tools like Flex for lexical analysis and Bison for syntactic parsing to construct an abstract syntax tree (AST) represented by AstNode structures.[16] This AST captures the hierarchical design, including modules, signals, and connections.[16] The design flattening phase eliminates hierarchy through a series of transformations on the AST. It starts with linking to resolve module and signal references, followed by parameterization to propagate constants and generate unique module instances.[16] Width elaboration assigns data types and bit widths to signals, while constification simplifies expressions and removes dead code.[16] Hierarchical linking flattens procedural blocks like begin/end statements, and module inlining replaces submodule calls with their expanded logic, resolving connections statically by substituting ports with internal signals.[16] The scope phase then creates per-instance copies of variables, fully unrolling the design into a flat netlist without runtime hierarchy resolution.[17] In the compilation pipeline, Verilator applies static scheduling by analyzing dependencies via graph-based ordering to determine execution sequences, assuming deterministic behavior without races.[16] It elaborates signals into a cycle-accurate model, identifying clocks and generating a master evaluation function.[16] The backend descope phase reverses flattening to structure the output as C++ classes, localizing variables for efficiency before emitting C++ or SystemC code, including header files (.h), model source (.cpp), and runtime stubs.[17] This pre-compilation to native executables avoids just-in-time compilation, producing standalone binaries when the --binary option is used.[18] Verilator targets only synthesizable HDL subsets, excluding non-deterministic elements like # delays or real-time constructs, and enforces two-state logic without tri-state buses or unknown propagation beyond randomization.[17] During flattening and early phases, built-in linting detects unsupported constructs, issuing warnings or errors for potential non-deterministic behavior, such as race conditions in concurrent assignments.[19]Supported Languages and Standards
Verilator provides full support for the Verilog-2005 standard (IEEE 1364-2005), including features such as signed numbers,always @* sensitivity, generate statements, multidimensional arrays, localparam declarations, and C-style port declarations.[20] It also covers Verilog-2001 (IEEE 1364-2001) constructs and extends to Verilog-AMS subsets with the --language VAMS option, enabling support for analog-mixed signal elements like wreal and mathematical functions such as ceil.[20]
For SystemVerilog, Verilator offers substantial support for synthesizable subsets as outlined in IEEE 1800 standards up to the 2023 edition, encompassing operators like ==? and !=?, increment/decrement (++/--), system tasks such as $bits and $countones, and constructs including always_comb, enumerations, interfaces with modports, and limited class features for methodologies like UVM (e.g., member variables, methods, extensions, and parameters).[20] Assertions are supported through simple concurrent forms and synthesis directives (e.g., //synopsys full_case), with runtime checks added if formal verification cannot prove them; in versions prior to 5.038, the --assert flag was required to enable elaboration, but assertions are now enabled by default.[21] The tool aims for compliance with IEEE 1800-2005 through 1800-2023, including full preprocessor support in 2012 and later, as well as enhancements like triple-quoted strings in 2023.[20]
Limitations in SystemVerilog coverage include partial handling of advanced features such as dynamic arrays, constraints (which may trigger warnings and be ignored), and complex class hierarchies, prioritizing synthesizable code over full behavioral simulation.[20] Verilator focuses on cycle-accurate, two-state logic simulation without native four-state (X/Z) propagation, randomizing unknown values with the --x-assign option, and it ignores most timing controls unless the --timing flag (requiring C++20) is used.[20] Behavioral modeling is restricted to synthesizable subsets, with support for select system tasks like $display, $finish, $stop, $time, and $write converted to C++ equivalents, but constructs like $monitor or full event-driven semantics are not implemented.[22]
VHDL is not natively supported.[23] PSL (Property Specification Language) and Sugar assertions are no longer supported, with users directed to SystemVerilog assertions instead since version 3.860.
As an extension, Verilator integrates with dialects like TL-Verilog, a SystemVerilog-based specification for TileLink protocols commonly used in open-source RISC-V projects, enabling simulation through compatible tools like Makerchip.[24]
Key Features
Simulation and Performance Optimizations
Verilator enhances simulation speed and efficiency through a suite of optimizations applied during the compilation process to generate high-performance C++ models. These optimizations transform cycle-based RTL descriptions into streamlined executables, prioritizing deterministic execution over event-driven paradigms to achieve substantial performance gains. By leveraging compiler techniques and parallelization, Verilator enables rapid simulation of complex designs, making it suitable for iterative verification workflows.[25] One key feature is multithreading support, enabled via the--threads N flag, which partitions the design into independent macro-tasks executed in parallel across multiple CPU cores. This approach scales effectively for large designs, providing 2-10x additional speedup on multi-core systems by balancing computational load and minimizing synchronization overhead. For optimal performance, users can employ tools like numactl to affinity threads to specific processors, further reducing latency in NUMA architectures.[26][27]
The dataflow graph (DFG) optimizer, introduced in version 5.002, models combinational logic as directed graphs to identify and eliminate redundant computations, such as unnecessary signal propagations across cycles. This peephole-style optimization combines constant propagation and gate-level simplification, reducing overall cycle times and improving throughput for logic-heavy designs; it can be disabled with -fno-dfg if needed for debugging. By representing dependencies explicitly, the DFG enables more aggressive pruning than traditional methods, contributing to measurable efficiency gains in acyclic logic paths.[28][29]
Static analysis optimizations further refine the generated code by inlining constants, eliminating dead code, and optimizing scheduling to minimize C++ bloat and runtime overhead. Constant propagation replaces variables with known values early in the pipeline, while dead code elimination removes unused assignments and cells (controllable via -fno-dead-assigns or -fno-dead-cells), streamlining the model for faster execution. Scheduling adjustments, integrated with multithreading, reorder operations to exploit locality and reduce branching, collectively yielding 10-100x speedups over traditional event-driven simulators for RTL and gate-level models. These techniques ensure the compiled binary remains lean, avoiding the interpretive overhead of event queues.[30][25]
Verilator's optimizations result in a low memory footprint, as the simulation runs as a native compiled binary rather than an interpreted environment, making it well-suited for gate-level or RTL simulation of million-gate designs. This resource efficiency allows simulations on standard hardware without excessive RAM demands, contrasting with event-driven tools that scale poorly with design size due to dynamic event management. For instance, hierarchical partitioning via --hierarchical further distributes memory usage across modules, supporting scalable verification of large-scale SoCs.[25][31]
Verification and Debugging Tools
Verilator provides a suite of built-in verification and debugging mechanisms that operate during the verilation process, ensuring design correctness by detecting potential issues early and generating diagnostic outputs for analysis. These tools include linting for static code checks, coverage analysis for assessing verification completeness, waveform tracing for signal visualization, and assertion elaboration for runtime property verification. By integrating these features, Verilator facilitates efficient debugging of hardware designs without requiring external simulators. Linting in Verilator automatically detects over 100 potential design issues during the elaboration phase, such as unconnected ports (PINNOCONNECT and PINMISSING warnings), race conditions (RACEVARIABLE and BLKANDNBLK for mixing blocking/non-blocking assignments), and width mismatches (WIDTH for operand size discrepancies). These checks are enabled by default and can be run standalone using the--lint-only option, which performs static analysis without generating simulation code. Warnings are categorized into lint (style and correctness) and fatal errors, with suppression possible via Verilator Control Files or command-line flags like -Wno-<warning>. This linting process helps identify synthesizability problems and simulation-semantic mismatches before compilation.[21]
Coverage analysis supports SystemVerilog constructs to measure verification thoroughness, including functional coverage points via covergroups (enabled with --coverage-user), line coverage (--coverage-line for basic block tracking), and toggle coverage (--coverage-toggle for signal transitions). After simulation, Verilator outputs detailed reports in text format, summarizing coverage percentages and uncovered elements to guide test development. User-inserted functional coverage translates directly into runtime counters, allowing designers to track specific design behaviors like state transitions or protocol compliance. These features ensure comprehensive verification without significant runtime overhead.[21]
Waveform tracing generates diagnostic files for signal debugging, supporting VCD (via --trace, deprecated), FST (--trace-fst), and LXT2 (--trace-lxt2) formats. The --trace options insert tracing code during verilation, producing C++ files that, when compiled and run, output trace dumps controllable via $dumpfile and $dumpvars in the testbench. Recent versions (5.000+) parallelize tracing with --trace-threads <n>, enabling multi-threaded dump generation for large designs to maintain performance. This allows visualization in tools like GTKWave, aiding in the identification of timing and logic errors.[21]
Assertions are elaborated into efficient runtime checks, supporting SystemVerilog immediate and concurrent assertions (SVA) with the --assert flag (default since version 5.038). Verilator also integrates a simple subset of PSL properties without time-branching operators, enabling formal-like verification of design invariants. Failures trigger simulation stops (configurable with --no-stop-fail), providing immediate feedback on violations. These mechanisms convert high-level assertions into optimized C++ code, enhancing debuggability while preserving simulation speed.[21][32]
Applications
Academic and Research Use
Verilator has become a staple in university curricula for teaching register-transfer level (RTL) design and verification, particularly in courses focused on digital systems and hardware description languages. Its zero-cost licensing and rapid compilation times enable students to iterate quickly on Verilog and SystemVerilog designs without the barriers posed by proprietary simulators. For instance, at the University of Waterloo, the ECE627 course on RTL Digital Systems integrates Verilator alongside open-source tools like Yosys for hands-on labs covering the full FPGA design flow, from synthesis to simulation.[33] Similarly, Imperial College London's EIE2-IAC course employs Verilator for cycle-accurate simulations in testbench development, allowing students to explore logic specifications and timing behaviors in practical assignments.[34] These applications highlight Verilator's role in fostering accessible education, where fast feedback loops accelerate learning of complex verification concepts. In research settings, Verilator supports co-simulation of hardware models with software environments, facilitating studies in processor-firmware interactions and hardware-software co-design. Researchers leverage its C++ output to integrate RTL designs into full-system simulators like gem5, enabling performance analysis of ASIC and FPGA prototypes under realistic workloads.[35] For example, the gem5+rtl framework uses Verilator to embed RISC-V RTL cores into gem5's SoC model, achieving cycle-accurate co-simulation for benchmarking multi-core systems and evaluating architectural trade-offs.[36] In hardware-software co-design, projects like ASH employ Verilator as a baseline for accelerating RTL simulation through parallel C++ execution, demonstrating up to 1,485× speedup on multi-core hosts for large designs including CPU and accelerator prototypes.[37] This capability is particularly valuable for exploratory research, where Verilator's efficiency allows extensive parameter sweeps without hardware overhead. Academic papers frequently cite Verilator in domains such as RISC-V accelerators, neural network hardware, and open-source electronic design automation (EDA) flows. In RISC-V studies, it verifies custom accelerators; for instance, simulations of vector extensions in RISC-V cores use Verilator to validate instruction set compliance and performance metrics.[38] For neural networks, researchers at Carnegie Mellon University applied Verilator to model and debug a hardware implementation for handwritten digit classification on FPGAs, confirming functional equivalence to software references.[39] Integration with tools like Chisel enhances its utility in academic hardware generation, as seen in verification libraries that combine Chisel's Scala-based designs with Verilator simulations for dynamic testing of generated RTL.[40] Additionally, Verilator anchors open-source EDA workflows in research on full RTL-to-GDS flows for RISC-V SoCs, promoting reproducible designs from simulation to layout.[41] The tool's open-source nature enables large-scale simulations on commodity hardware, bypassing the need for expensive commercial licenses and supporting reproducible research in academia. This democratizes access to high-fidelity verification, allowing scholars to prototype and benchmark complex systems iteratively, as evidenced by its widespread adoption in academic literature for hardware exploration. More recently, as of 2025, researchers at the University of Southampton have integrated Verilator with Moodle for open-source, web-based automated marking of SystemVerilog labs, enhancing scalable assessment in digital design education.[42] By facilitating such environments, Verilator contributes to advancements in open hardware ecosystems, where transparency and cost-effectiveness drive innovation in co-design methodologies.Open-Source Projects
Verilator serves as a core simulator in the RISC-V ecosystem, particularly for open-source hardware projects focused on secure and general-purpose processors. In OpenTitan, a RISC-V-based secure chip developed by Google and lowRISC, Verilator provides cycle-accurate simulation by translating the project's synthesizable Verilog RTL into optimized C++ models, enabling developers to build and execute simulations without proprietary tools.[43] This integration supports the project's open-source ambitions by facilitating RTL verification and software testing in a fully free environment. Similarly, Verilator models the OpenRISC architecture, an open 32-bit RISC processor from OpenCores, by generating SystemC-based cycle-accurate representations of SoCs like ORPSoC, which includes CPU, memory, and peripherals, allowing for performance analysis and firmware development.[44] The Fedora Electronic Lab, an open-source platform for hardware design and simulation, incorporates Verilator as part of its Veripool tool suite for linting and simulating Verilog designs in Fedora distributions, streamlining micro-electronics workflows.[45] Verilator integrates seamlessly with Scala-based hardware description languages like Chisel and SpinalHDL, enabling verification of the Verilog code they generate through high-speed simulation backends. In Chisel, developed at UC Berkeley, Verilator acts as a backend via the ChiselTest library, allowing simulation of elaborated SystemVerilog modules with features like waveform generation and temporal assertions, which supports verification in both academic and industrial settings.[46] SpinalHDL, an open-source HDL, uses Verilator as a primary simulation engine, compiling generated Verilog into C++ executables for fast cycle-based testing on Linux and Windows platforms, with compatibility ensured from version 4.218 onward.[47] These flows leverage Verilator's linting and optimization capabilities to verify complex designs in collaborative environments, such as RISC-V IP development. Beyond core ecosystems, Verilator supports specialized open-source projects for interconnect and verification tasks. In OpenTitan, Verilator verifies TileLink interconnects through TL-UL protocol assertions and simulation bindings, ensuring compliance in bus fabrics for the secure chip's multi-device architecture.[48] For open verification methodologies, Verilator pairs with UVM-SystemC libraries to create industry-level testbenches in C++, enabling constrained-random testing and coverage analysis for RTL designs like RISC-V microprocessors, while addressing limitations in event-driven timing.[49] Verilator also contributes to open-source EDA initiatives for full ASIC flows, integrating with tools like Surelog and OpenLane under the CHIPS Alliance to support SystemVerilog simulation in projects such as Ibex and OpenTitan, facilitating end-to-end tapeout without commercial dependencies.[50] Across these projects, Verilator enables early firmware bring-up by simulating hardware-software interactions in C++ environments, allowing developers to test boot code and peripherals prior to silicon availability, as demonstrated in OpenTitan's UART smoketests and ROM-to-Flash execution flows.[51] It further supports regression testing through continuous integration pipelines, such as GitHub Actions, where Verilator compiles designs, runs testbenches, and generates coverage reports to validate changes in open-source repositories.[52] For multi-core SoCs, Verilator simulates systems like the OpenRISC-based ORPSoC, optimizing models to achieve simulation speeds up to 129 kHz on standard hardware, which aids in profiling and debugging parallel firmware execution.[44]Commercial Implementations
Verilator has seen significant adoption in commercial semiconductor environments, particularly for accelerating verification workflows in resource-constrained settings. Companies such as NXP (formerly Philips Semiconductors) have integrated Verilator into their SoC regression testing pipelines, leveraging its cycle-accurate C++ models to handle substantial portions of simulation cycles—up to 80% in some verification flows—while contributing to its development through extensive testing efforts.[17] Similarly, Art of Silicon employs Verilator to enable massively parallel HDL simulations, distributing workloads across multiple instances for efficient IP validation in complex designs.[53] Bosch, a key player in automotive semiconductors, utilizes Verilator to benchmark processor cores within SoC architectures by translating RTL into SystemC models, facilitating early performance analysis in safety-critical applications.[54] In industry use cases, Verilator supports high-volume simulations within CI/CD pipelines, allowing semiconductor firms to automate regression runs on cloud infrastructure without incurring per-seat licensing costs associated with proprietary simulators. This enables scaling to thousands of parallel test scenarios, as seen in verification environments for automotive chips and emerging AI accelerators. For early architecture exploration, its fast compilation to optimized C++ code permits rapid iteration on design alternatives, often in hybrid setups where Verilator handles RTL simulation alongside proprietary tools for full-system validation. Integration with UVM-compliant frameworks, through emerging SystemVerilog support and UVM-SystemC adaptations, ensures adherence to industry verification standards while maintaining open-source flexibility.[22][49] Key advantages in commercial deployments include substantial cost savings from its license-free model, which facilitates elastic cloud computing for large-scale regressions that would otherwise be prohibitive. For instance, verifying automotive SoCs benefits from Verilator's speed—often 10x faster than traditional SystemC simulators—reducing turnaround times for compliance with ISO 26262 standards. In AI accelerator development, it aids in modeling high-gate-count interconnects and memory hierarchies, providing insights into power and timing trade-offs early in the cycle. Its open-source nature has further accelerated adoption by lowering barriers to entry for mid-tier firms exploring advanced verification.[1] Verilator addresses industry challenges in handling massive designs exceeding 10 million gates by supporting hierarchical compilation and multithreading, which mitigate memory demands—up to 64 GB for peak cases—and compilation times through phased verilation. Custom wrappers via the DPI interface enable seamless firmware co-simulation, integrating C-based software models with RTL for holistic system-level testing in environments like automotive ECUs. These capabilities make it viable for production flows, though users often pair it with waveform tools or proprietary debuggers for full traceability.[22][55]Integrations
With SystemC and C++
Verilator supports integration with SystemC by generating compatible models using the--sc flag during compilation, which translates SystemVerilog designs into SystemC code while preserving the original module hierarchy as SC_MODULE instances.[56] This output format allows the generated models to interface seamlessly with SystemC environments, enabling the construction of transaction-level models (TLM) that leverage SystemC's abstraction layers for system-level simulation.[56] The resulting files, typically placed in an output directory specified by --Mdir, include headers and source files that can be compiled against the SystemC library to form executable simulations.[30]
For native C++ integration, Verilator produces a C++ class representing the design (e.g., Vtop for a top module named top), which exposes top-level input/output ports as public member references and provides methods such as eval_step() to advance the simulation by one clock cycle.[57] Users must implement a C++ wrapper class or main loop to instantiate this model, manage clock signals by toggling inputs and calling eval_step(), handle resets through dedicated signals, and interface with external I/O.[57] Tracing capabilities are supported via the VerilatedVcd class, which generates VCD waveform files when linked and invoked in the wrapper, facilitating debugging of signal behaviors during execution.[57]
Advanced features enhance multi-component simulations, such as the VerilatedContext class, which manages shared resources like time and VPI callbacks across multiple model instances, allowing for hierarchical or partitioned designs within a single C++ application.[57] Parallel execution is possible by partitioning the design into threads using std::thread from the C++ standard library, where each thread handles a subset of the model via separate contexts, provided the design supports fine-grained parallelism.[57]
Integration requires linking the generated code against the Verilator runtime library (e.g., libverilated.a) and, for SystemC modes, the SystemC library (typically via CMake's find_package(SystemC) or manual flags like -lsystemc).[12] This setup enables embedding Verilator models into larger C++ applications, such as for hardware-in-the-loop (HIL) testing where the simulated hardware interacts with real software or control systems.[30]