Verilog

Verilog is a hardware description language (HDL) used in electronic design automation to describe the structure and behavior of digital circuits. It is widely employed for register-transfer level (RTL) modeling, testbench creation, functional verification, timing verification, and synthesis of digital logic designs. Verilog shares syntax similarities with the C programming language, making it accessible to software engineers transitioning to hardware design.

Note: While Verilog is primarily used for simulation and synthesis, its evolution into SystemVerilog has significantly expanded its capabilities for advanced verification and constrained random testing in modern SoC design flows.

2. History & Standardization

Verilog was created in 1984 by Phil Moorby while working at Gateway Design Automation, a company founded by two ex-Intel engineers. The language was developed to provide a flexible, C-like syntax for hardware modeling, contrasting with the more verbose Ada-like syntax of VHDL. In 1990, Gateway Design Automation was acquired by Cadence Design Systems, which continued to commercialize the language under the trade name Verilog-PLI (Programming Language Interface).

Standardization efforts began in 1993 with IEEE Std. 1364-1995, establishing Verilog as an open standard. Subsequent revisions included IEEE Std. 1364-2001 and IEEE Std. 1364-2005. The language's standardization body is now Accellera Systems Initiative, which also oversees the development of SystemVerilog (IEEE Std. 1800). Today, Verilog remains one of the two dominant HDLs in the semiconductor industry, alongside VHDL.

3. Language Structure

Verilog is a textual HDL that supports multiple abstraction levels, including behavioral, RTL, gate-level, and switch-level modeling. Its syntax is structured around modular design, data declarations, continuous assignments, and procedural blocks.

3.1 Modules & Ports

The fundamental building block in Verilog is the module. A module encapsulates a set of logic or behavioral statements and communicates with other modules through input, output, and inout ports. Hierarchical instantiation allows complex systems to be constructed from reusable components.

module adder (
    input  wire [7:0] a,
    input  wire [7:0] b,
    output wire [8:0] sum
);
    assign sum = a + b;
endmodule

3.2 Data Types

Verilog supports several data types, with wire and reg being the most commonly used at the RTL level. wire represents physical connectivity and is used for continuous assignments. reg holds values assigned within procedural blocks (always, initial). Multi-bit signals are declared using vector notation, e.g., [7:0] for an 8-bit bus.

3.3 Procedural Blocks

Behavioral simulation is driven by procedural blocks:

  • initial: Executes once at the start of simulation (typically used in testbenches).
  • always: Executes repeatedly based on a sensitivity list (@(posedge clk) for synchronous logic, or @(*) for combinational logic).
always @(posedge clk or posedge reset) begin
    if (reset) begin
        count <= 8'd0;
    end else begin
        count <= count + 1;
    end
end

4. Key Features & Capabilities

  • Multi-Abstraction Modeling: Supports algorithmic, RTL, gate, and switch-level descriptions.
  • Simulation & Testbenches: Built-in timing controls (#delay, wait) enable precise verification environments.
  • Synthesis Support: RTL code can be compiled by EDA tools into gate-level netlists for ASIC or FPGA implementation.
  • Task & Function Support: Promotes code reuse and modularity through reusable subroutines.
  • Parameterization: `define macros and parameter declarations enable generic, configurable designs.

5. Evolution to SystemVerilog

In the early 2000s, the limitations of Verilog for complex system verification led to the creation of SystemVerilog, a superset that merged Verilog-2005 with Vera (a verification language from Synopsys). Standardized as IEEE Std. 1800, SystemVerilog introduces:

  • Object-oriented programming (classes, inheritance, virtual interfaces)
  • Constrained random testing and sequences
  • Advanced data types (logic, bit, arrays, queues)
  • Coverage analysis and assertion-based verification (SVA)
  • Improved synthesis and RTL modeling features

While Verilog remains foundational, modern design flows increasingly rely on SystemVerilog for verification, though pure Verilog is still widely used for simple RTL modules and academic instruction.

6. Verilog vs. VHDL

Both Verilog and VHDL are IEEE-standardized HDLs, but they differ in philosophy and ecosystem:

  • Syntax: Verilog uses C-like syntax; VHDL uses Pascal/Ada-like syntax.
  • Type Safety: VHDL is strongly typed and stricter, reducing synthesis ambiguities. Verilog is more permissive, which can lead to simulation/synthesis mismatches if not carefully coded.
  • Industry Adoption: Verilog dominates in the US commercial sector and academia. VHDL is prevalent in European aerospace, defense, and high-reliability sectors.
  • Verification: SystemVerilog has largely superseded VHDL in modern verification flows due to its OOP and randomization capabilities.

EDA tools support both languages, and mixed-language simulations are common in large-scale projects.

7. References & Further Reading

  1. IEEE Std. 1364-2005: IEEE Standard for Verilog Hardware Description Language
  2. IEEE Std. 1800-2023: IEEE Standard for SystemVerilog Unified Hardware Design, Specification, and Verification Language
  3. Pearl, P. (2005). Verilog HDL: A Guide to Digital Design and Synthesis. Prentice Hall.
  4. Sternheim, M. et al. (2007). Verilog and SystemVerilog for FPGAs: Hardware/Software Co-Design. Wiley-IEEE Press.
  5. Accellera Systems Initiative. Verilog & SystemVerilog Documentation. https://www.accellera.org