Verilator

Last updated

Verilator [1]
Developer(s) Wilson Snyder
Repository
Written inC++
Operating system Linux, FreeBSD, Microsoft Windows (via Cygwin [2] )
Type Simulator
License LGPL-3.0-only or Artistic-2.0
Website verilator.org

Verilator is a free and open-source software tool which converts Verilog (a hardware description language) to a cycle-accurate behavioral model in C++ or SystemC. The generated models are cycle-accurate and 2-state; as a consequence, the models typically offer higher performance than the more widely used event-driven simulators, which can model behavior within the clock cycle. Verilator is now used within academic research, open source projects and for commercial semiconductor development. It is part of the growing body of free EDA software.

Contents

Usage

Verilator has seen its widest adoption in the academic and open source communities. The semiconductor industry has been more cautious in its adoption of an open source tool, and has the financial means to use commercial alternatives. [3]

Academic

Researchers have used Verilator to develop new co-simulation environments, [4] as part of general ASIC and FPGA design flows [5] [6] and in performance and power analysis. [7] Verilator is also a popular tool for student dissertations, for example. [8]

Open Source

Verilator is an open source tool, and has in turn been adopted by a number of other projects. The Fedora Electronic Lab has adopted Verilator as part of its open source design flow for Fedora 11. The OpenRISC architecture from OpenCores includes a cycle accurate reference model, generated from Verilog using Verilator. A recent paper [9] described how the regression test suite for GCC could be run against a Verilator model of the OpenRISC 1200 as a way of detecting errors in the Verilog RTL implementation. TestDrive Profiling Master tool provides the virtual FPGA environment using Verilator.

Commercial

Commercially, Philips Semiconductors (now NXP) have led the way. [10] Their use of Verilator is becoming more widespread, for example within application notes. [11] More recently Art of Silicon have described their use of Verilator on a farm of Linux processors as a route to faster regression testing of their commercial designs. [12] [13] The current maintainer of Verilator identified [14] 27 companies and universities who had reported use of Verilator or contributed to its development, including Intel, Arm, CSR, Broadcom, Raytheon, Infineon, Stanford University, Imperial College London and Embecosm.

History

Verilator's user manual provides a short history. [15] The tool originated in 1994 with a team led by Paul Wasson at the Core Logic Group at Digital Equipment Corporation (DEC). It was used to convert Verilog code to C for co-simulation with a C based CPU model of the Alpha processor. During the mid-1990s Duane Galbi took over responsibility for development and the technology was adopted by other groups in DEC. In 1998 DEC released the source code.

Since 2001 the technology has been developed by Wilson Snyder and others as part of the Veripool open source project. A SystemC mode was added and the tool rewritten from scratch in C++, leading to an increase in performance. In 2022 Verilator Version 5 added an IEEE-compliant scheduler and delay semantics, relaxing previous restrictions that ignored all delays.

Technology and key features

Verilator converts Verilog to C++ or SystemC. It can handle all versions of Verilog and also some SystemVerilog assertions. The approach is closer to synthesis than event-driven simulation. The entire design is flattened (that is, all modules are expanded to create one module). Static analysis is used to eliminate wires and schedule all processes at model generation time. A C++ class is generated with a function which takes 2-state values on input ports and advance them to values on output ports at the next clock edge.

SystemC is supported by providing a wrapper class using SystemC ports and with sensitivity to the clock(s), which will drive the ports of the underlying C++ model.

Verilator supports automatically partitioning designs into multiple threads, also potentially improving performance.

Using with MATLAB

Verilator converts synthesizable Verilog to C++, while C++ library could be compiled into a MEX file using MATLAB interface to C++. This is how Verilog designs can be directly simulated from MATLAB. Using compiled C++ models with MATLAB is faster than using co-simulation interfaces with a separate HDL simulator. There is an open-source project called vmodel that compiles Verilog into a MEX file using Verilator and provides a set of functions for model simulation from MATLAB.

See also

Related Research Articles

<span class="mw-page-title-main">Field-programmable gate array</span> Array of logic gates that are reprogrammable

A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence the term field-programmable. The FPGA configuration is generally specified using a hardware description language (HDL), similar to that used for an application-specific integrated circuit (ASIC). Circuit diagrams were previously used to specify the configuration, but this is increasingly rare due to the advent of electronic design automation tools.

Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It is also used in the verification of analog circuits and mixed-signal circuits, as well as in the design of genetic circuits. In 2009, the Verilog standard was merged into the SystemVerilog standard, creating IEEE Standard 1800-2009. Since then, Verilog is officially part of the SystemVerilog language. The current version is IEEE standard 1800-2017.

In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, and most commonly, digital logic circuits.

<span class="mw-page-title-main">System on a chip</span> Micro-electronic component

A system on a chip or system-on-chip is an integrated circuit that integrates most or all components of a computer or other electronic system. These components almost always include on-chip central processing unit (CPU), memory interfaces, input/output devices, input/output interfaces, and secondary storage interfaces, often alongside other components such as radio modems and a graphics processing unit (GPU) – all on a single substrate or microchip. It may contain digital, and also analog, mixed-signal, and often radio frequency signal processing functions.

OpenRISC is a project to develop a series of open-source hardware based central processing units (CPUs) on established reduced instruction set computer (RISC) principles. It includes an instruction set architecture (ISA) using an open-source license. It is the original flagship project of the OpenCores community.

<span class="mw-page-title-main">OpenCores</span> Open-source hardware community

OpenCores is a community developing digital open-source hardware through electronic design automation (EDA), with a similar ethos as the free software movement. OpenCores hopes to eliminate redundant design work and slash development costs. A number of companies have been reported as adopting OpenCores IP in chips, or as adjuncts to EDA tools. OpenCores is also cited from time to time in the electronics press as an example of open source in the electronics hardware community.

The MicroBlaze is a soft microprocessor core designed for Xilinx field-programmable gate arrays (FPGA). As a soft-core processor, MicroBlaze is implemented entirely in the general-purpose memory and logic fabric of Xilinx FPGAs.

In electronic design, a semiconductor intellectual property core, IP core, or IP block is a reusable unit of logic, cell, or integrated circuit layout design that is the intellectual property of one party. IP cores can be licensed to another party or owned and used by a single party. The term comes from the licensing of the patent or source code copyright that exists in the design. Designers of application-specific integrated circuits (ASIC) and systems of field-programmable gate array (FPGA) logic can use IP cores as building blocks.

<span class="mw-page-title-main">SystemVerilog</span> Hardware description and hardware verification language

SystemVerilog, standardized as IEEE 1800, is a hardware description and hardware verification language used to model, design, simulate, test and implement electronic systems. SystemVerilog is based on Verilog and some extensions, and since 2008, Verilog is now part of the same IEEE standard. It is commonly used in the semiconductor and electronic design industry as an evolution of Verilog.

<span class="mw-page-title-main">OrCAD</span> Electronic design automation software

OrCAD Systems Corporation was a software company that made OrCAD, a proprietary software tool suite used primarily for electronic design automation (EDA). The software is used mainly by electronic design engineers and electronic technicians to create electronic schematics, and perform mixed-signal simulation and electronic prints for manufacturing printed circuit boards (PCBs). OrCAD was taken over by Cadence Design Systems in 1999 and was integrated with Cadence Allegro in 2005.

Intel Quartus Prime is programmable logic device design software produced by Intel; prior to Intel's acquisition of Altera the tool was called Altera Quartus Prime, earlier Altera Quartus II. Quartus Prime enables analysis and synthesis of HDL designs, which enables the developer to compile their designs, perform timing analysis, examine RTL diagrams, simulate a design's reaction to different stimuli, and configure the target device with the programmer. Quartus Prime includes an implementation of VHDL and Verilog for hardware description, visual editing of logic circuits, and vector waveform simulation.

C to HDL tools convert C language or C-like computer code into a hardware description language (HDL) such as VHDL or Verilog. The converted code can then be synthesized and translated into a hardware device such as a field-programmable gate array. Compared to software, equivalent designs in hardware consume less power and execute faster with lower latency, more parallelism and higher throughput. However, system design and functional verification in a hardware description language can be tedious and time-consuming, so systems engineers often write critical modules in HDL and other modules in a high-level language and synthesize these into HDL through C to HDL or high-level synthesis tools.

Flow to HDL tools and methods convert flow-based system design into a hardware description language (HDL) such as VHDL or Verilog. Typically this is a method of creating designs for field-programmable gate array, application-specific integrated circuit prototyping and digital signal processing (DSP) design. Flow-based system design is well-suited to field-programmable gate array design as it is easier to specify the innate parallelism of the architecture.

Semulation is a computer science-related portmanteau of simulation and emulation, signifying the process of controlling an emulation through a simulator.

Aldec, Inc. is a privately owned electronic design automation company based in Henderson, Nevada that provides software and hardware used in creation and verification of digital designs targeting FPGA and ASIC technologies.

ModelSim is a multi-language environment by Siemens for simulation of hardware description languages such as VHDL, Verilog and SystemC, and includes a built-in C debugger. ModelSim can be used independently, or in conjunction with Intel Quartus Prime, PSIM, Xilinx ISE or Xilinx Vivado. Simulation is performed using the graphical user interface (GUI), or automatically using scripts.

This page is a comparison of electronic design automation (EDA) software which is used today to design the near totality of electronic devices. Modern electronic devices are too complex to be designed without the help of a computer. Electronic devices may consist of integrated circuits (ICs), printed circuit boards (PCBs), field programmable gate arrays (FPGAs) or a combination of them. Integrated circuits may consist of a combination of digital and analog circuits. These circuits can contain a combination of transistors, resistors, capacitors or specialized components such as analog neural networks, antennas or fuses.

<span class="mw-page-title-main">EVE/ZeBu</span> Provider of hardware-assisted verification tools

EVE/ZeBu is a provider of hardware-assisted verification tools for functional verification of Application-specific integrated circuits (ASICs) and system on chip (SOC) designs and for validation of embedded software ahead of implementation in silicon. EVE's hardware acceleration and hardware emulation products work in conjunction with Verilog, SystemVerilog, and VHDL-based simulators from Synopsys, Cadence Design Systems and Mentor Graphics. EVE's flagship product is ZeBu.

Verilog-to-Routing (VTR) is an open source CAD flow for FPGA devices. VTR's main purpose is to map a given circuit described in Verilog, a Hardware Description Language, on a given FPGA architecture for research and development purposes; the FPGA architecture targeted could be a novel architecture that a researcher wishes to explore, or it could be an existing commercial FPGA whose architecture has been captured in the VTR input format. The VTR project has many contributors, with lead collaborating universities being the University of Toronto, the University of New Brunswick, and the University of California, Berkeley. Additional contributors include Google, The University of Utah, Princeton University, Altera, Intel, Texas Instruments, and MIT Lincoln Lab.

<span class="mw-page-title-main">Lesley Shannon</span>

Lesley Shannon is a Canadian professor who is Chair for the Computer Engineering Option in the School of Engineering Science at Simon Fraser University. She is also the current NSERC Chair for Women in Science and Engineering for BC and Yukon. Shannon’s chair operates the Westcoast Women in Engineering, Science and Technology (WWEST) program to promote equity, diversity and inclusion in STEM.

References

  1. W Snyder, "Verilator and SystemPerl". North American SystemC Users' Group, Design Automation Conference, June 2004.
  2. "Veripool".
  3. "Arch Linux - verilator 4.224-1 (x86_64)". archlinux.org. Retrieved 7 August 2022.
  4. Oyama Masashiro, Tanaka Daisuke and Shimizu Naohiki. "C-language based Hardware and Software Co-Simulation Environment Featuring sfl2vl and Verilator", Joho Shori Gakkai Shinpojiumu Ronbunshu (Information Processing Society of Japan Symposium Thesis Collection), 2004 (10), 34–40.
  5. P Garcia and K Compton. "A Reconfigurable Hardware Interface for a Modern Computing System". FCCM 2007 (15th Annual IEEE Symposium on Field-Programmable Custom Computing Machines), 23–25 April 2007, 73–84, (the DOI listed for this paper, doi : 10.1109/FCCM.2007.49 is incorrect)
  6. Eric S. Chung, James C. Hoe, Babak Falsafi. "PROTO FLEX: Co-Simulation for Component-wise FPGA Emulator Development", WARFP 2006 (2nd Workshop on Architecture Research using FPGA Platforms), Austin Texas, 12 February 2006.
  7. Chin-Chie Huang, Jaw-Wei Chi, Tzu-Ching Lin, Lin-Wei Tsao, Yi-Jung Chen and Chia-Lin Yang. "System-Level Performance/Power Evaluation Framework for Platform-based SOC", Department of Computer Science and Information Engineering, National Taiwan University, 2008.
  8. Siddhartha Devalapalli. "Development of SystemC Modules from HDL for System-on-Chip Applications", MSc Dissertation, University of Tennessee, Knoxville, August 2004.
  9. Jeremy Bennett, Embecosm, "Processor verification using open source tools and the GCC regression test suite: A case study", Design Verification Club meeting, Bristol, Cambridge & Eindhoven, 20 September 2010,
  10. Jean-Paul van Itegem, Philips Semiconductors (now NXP), quoted in Deep Chip 25 October 2005
  11. Chuck Peplinski, "Hardware Prefetch and Data Cache Optimization Tools for Nexperia Media Processors", NXP Semiconductors, 11 January 2007 "Archived copy" (PDF). Archived from the original (PDF) on 20 August 2008. Retrieved 13 March 2009.{{cite web}}: CS1 maint: archived copy as title (link)
  12. Rich Porter, "Designer Productivity - An Alternate Approach", [National Microelectronics Institute], System-Level Design Network meeting, Engineers House, Bristol, UK 24 September 2009, available at www.slideshare.net/richporter/20090924aosnmiesl
  13. Rich Porter, "Architecture for Massively Parallel HDL Simulations", Design Verification Club meeting, Bristol, Cambridge & Eindhoven, 20 September 2010, "Archived copy" (PDF). Archived from the original (PDF) on 13 March 2012. Retrieved 24 September 2010.{{cite web}}: CS1 maint: archived copy as title (link)
  14. Wilson Snyder, Cavium Networks, "Verilator: Fast, Free, But for Me?", Design Verification Club meeting, Bristol, Cambridge & Eindhoven, 20 September 2010,
  15. Wilson Snyder, "Verilator-3.700", 7 January 2009