Module 4: Introduction to Verilog HDL · 4.1 Why HDL?

From RTL to Silicon

Transforming an initial specification into fabricated silicon requires approximately ten distinct engineering stages.

Understanding this sequence explains standard coding rules. Early verification is critical because the cost to correct hardware defects increases exponentially at each subsequent stage.

The Digital Design and Verification Flow

Figure 1 outlines the complete design flow from specification to physical tape-out:

The design flow
Figure 1: Complete digital IC design flow showing verification feedback loops

Feedback loops that return to the RTL stage represent design iterations caused by functional or timing defects.

1. Architectural Specification

The architectural specification defines the operational requirements:

  • Functional operations and algorithmic requirements
  • External interface bus protocols and pinouts
  • Target clock frequency, silicon area, and power dissipation constraints
  • Reset states and corner-case arbitration rules

Engineers must resolve functional ambiguities before writing code.

2. Register Transfer Level (RTL) Design

Engineers describe the architecture using synthesizable Verilog or SystemVerilog.

This 4-bit synchronous counter serves as a reference design:

`timescale 1ns / 1ps
`default_nettype none

module counter_4bit (
    input  wire       clk,      // System clock
    input  wire       rst_n,    // Active-low synchronous reset
    input  wire       en,       // Count enable
    output reg  [3:0] count     // Current counter output
);
    always @(posedge clk) begin
        if (!rst_n) begin
            count <= 4'b0000;
        end else if (en) begin
            count <= count + 4'b0001;
        end
    end

endmodule

The code maps directly to physical hardware: edge-triggered flip-flops with synchronous clear multiplexers and an incrementer.

3. RTL Simulation and Verification

A verification testbench instantiates the design module, applies input stimulus vectors, and verifies output waveforms:

`timescale 1ns / 1ps
`default_nettype none

module tb_counter_4bit;

    reg        clk;
    reg        rst_n;
    reg        en;
    wire [3:0] count;

    counter_4bit dut (
        .clk   (clk),
        .rst_n (rst_n),
        .en    (en),
        .count (count)
    );

    // Generate 100 MHz clock (10 ns period)
    initial clk = 0;
    always #5 clk = ~clk;

    initial begin
        $dumpfile("counter.vcd");
        $dumpvars(0, tb_counter_4bit);
    end

    initial begin
        rst_n = 0; en = 0;
        @(posedge clk);
        @(posedge clk);           // Apply two cycles of reset

        rst_n = 1; en = 1;
        repeat (20) @(posedge clk);   // Enable counting for 20 cycles

        en = 0;
        repeat (5) @(posedge clk);    // Verify hold condition

        $display("Final count: %0d", count);
        $finish;
    end

endmodule

Execute simulation using open-source tools:

iverilog -o counter_sim tb_counter_4bit.v counter_4bit.v && vvp counter_sim
gtkwave counter.vcd

In GTKWave, verify that count clears during reset, increments while enabled, and preserves state when en = 0. Correcting an error at this stage requires only minutes.

4. Static Lint Analysis

Static lint analysis inspects source text without execution. Linters detect undriven nets, unhandled clock domain crossings, bus width mismatches, and non-synthesizable constructs:

verilator --lint-only -Wall counter_4bit.v

Production teams enforce zero lint warnings in version control repositories.

5. Logic Synthesis

The synthesis tool converts RTL code into an optimized gate-level netlist targeting a technology library:

yosys -p "synth -top counter_4bit; write_verilog -noattr synth_counter.v" counter_4bit.v

Commercial synthesizers (Synopsys Design Compiler, Cadence Genus) read physical timing constraints (SDC) to optimize logic networks for speed and area.

6. Gate-Level Simulation (GLS)

The gate-level netlist is simulated using real cell delays annotated from Standard Delay Format (SDF) files.

GLS detects timing-dependent hold violations, glitch-sensitive resets, and initialization hazards obscured by behavioral RTL models.

7. Formal Verification

Formal equivalence checking proves mathematically that the gate-level netlist matches RTL behavior across all input states.

Model checking tools verify system assertions ($SVA$) to prove that safety properties cannot be violated under any operational condition.

8. Physical Placement and Routing (P&R)

Physical design tools place standard cells, synthesize clock distribution trees (CTS), and route metal interconnect lines. OpenROAD provides open-source implementation, while Cadence Innovus and Synopsys IC Compiler II provide commercial flows.

9. Static Timing Analysis (STA)

Static timing tools verify setup and hold constraints across all physical paths under extreme Process, Voltage, and Temperature (PVT) operating corners.

A design achieves timing closure when all slack values are non-negative ($\ge 0\text{ ps}$).

10. Physical Sign-Off and Tape-Out

Final sign-off verification ensures manufacturing feasibility:

  • Design Rule Checking (DRC): Verifies physical geometries against foundry fabrication rules.
  • Layout Versus Schematic (LVS): Confirms that physical layout matches the logical netlist.
  • Parasitic Extraction (PEX): Extracts physical wire resistance and capacitance for sign-off timing closure.

Completed layout files (OASIS or GDSII) are delivered to the semiconductor foundry (tape-out).

The Defect Cost Escalation Curve

The cost to correct a hardware defect escalates exponentially as a project advances through the flow:

Verification Stage Relative Cost Multiplier Approximate Fix Duration
RTL Simulation $1\times$ Hours
Static Lint Analysis $2\times$ Hours to days
Gate-Level Simulation $10\times$ Days to weeks
Static Timing Analysis $30\times$ Weeks to months
Post-Fabrication Silicon $1000\times+$ Months (requires physical mask re-spin)

Thorough RTL verification is essential to prevent costly silicon re-spins.

Toolchain Reference Mapping

Design Flow Stage Open-Source Tool Commercial Tool
RTL Simulation Icarus Verilog Synopsys VCS, Cadence Xcelium
Waveform Inspection GTKWave Synopsys Verdi
Static Linting Verilator Synopsys SpyGlass
Logic Synthesis Yosys Synopsys Design Compiler, Cadence Genus
FPGA Implementation NextPNR AMD Vivado, Intel Quartus Prime
ASIC Place and Route OpenROAD Cadence Innovus, Synopsys ICC2
Static Timing Analysis OpenSTA Synopsys PrimeTime

The next article compares Verilog, VHDL, and SystemVerilog, explaining language selection across the semiconductor industry.

← Simulation and Synthesis Verilog, VHDL and SystemVerilog →