Skip to main content

RTL Design with Verilog

A structured, tool-driven course on Register-Transfer Level (RTL) design using Verilog, written for students who want a professional workflow rather than a collection of disconnected snippets.

Every lesson is self-contained, every example is runnable, and the complete source for each design lives in the examples/ folder of this repository.


Course map​

Part I — Foundations​

  1. Why RTL, different HDLs, and why Verilog?
  2. Preferred tools: Icarus Verilog + GTKWave

Part II — The four modeling levels​

  1. The four modeling levels — overview
  2. Switch level — CMOS NOR (1 example)
  3. Gate level — NOR and full adder (2 examples)
  4. Dataflow modeling — half adder and 2:1 MUX (2 examples)
  5. Behavioral modeling — DFF with reset, 4:1 MUX, 4-bit up counter (3 examples)

Part III — Verification (an independent topic, not a level)​

  1. Verification with testbenches (2 testbenches)

Part IV — Reference​

  1. Essential Verilog concepts — instantiation, concurrency, blocking/non-blocking, sensitivity lists, wire vs reg, value types, buses and scalars

A note on terminology​

Verilog is usually described as having four levels of modeling:

#LevelConstructs
1Switch levelnmos, pmos, cmos
2Gate leveland, or, nor, not, …
3Dataflowassign
4Behavioralalways, case, if

Verification is not a modeling level. It is a separate discipline that uses non-synthesizable constructs (initial, $dumpfile, $dumpvars, $finish, #delay) to check that a design — written at any of the four levels — behaves correctly. It is taught last because it depends on having a design to check, not because it is a fifth level of abstraction.


What you need​

  • A computer running Windows, macOS, or Linux
  • Icarus Verilog (iverilog, vvp)
  • GTKWave
  • A text editor (VS Code recommended)

Installation instructions are in lesson 2.