Skip to content
Tutorials Center
My learning

Topics

VHDL Tutorial

Learn VHDL step by step: 37 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is VHDL? Learn what VHDL is, how a hardware description language differs from software, where VHDL is used (FPGAs, ASICs) and how to think in parallel circuits.
  2. 2 The VHDL Design Flow and Tools Follow a VHDL design from idea to chip: write, analyze, elaborate, simulate, synthesize, place and route. Meet GHDL, GTKWave, Vivado, Quartus and ModelSim.
  3. 3 Your First Design: The Half Adder Write your first VHDL design, a half adder: entity, architecture, concurrent assignments and a simple testbench, plus a C truth-table stand-in to check it.
  4. 4 VHDL Syntax Basics Learn VHDL syntax: case-insensitivity, identifiers, comments, literals, operators and their precedence, and how to read a VHDL file without getting lost.

Entities and Architectures

  1. 5 Entity Declarations and Ports Learn the VHDL entity declaration: port names, modes in, out, inout and buffer, vector ports, reading output ports, default values and port-naming habits.
  2. 6 The Architecture Body Understand the VHDL architecture: declarative part, statement part, dataflow, behavioral and structural styles, multiple architectures and configurations.
  3. 7 Generics and Constants Make VHDL designs reusable with generics and constants: width parameters, default values, generic map, derived constants, ceil log2 and assertions.
  4. 8 Structural Design and Components Build bigger circuits from smaller ones in VHDL: component declarations, direct entity instantiation, port map styles, hierarchy and a ripple-carry adder.
  5. 9 Libraries, Packages and Use Clauses Learn how VHDL organizes code: the work and ieee libraries, use clauses, std_logic_1164 and numeric_std, and how to write your own package with types, constants and functions.

Data Types and Signals

  1. 10 std_logic and Other Basic Types Learn VHDL's basic types: bit, boolean, integer, time, and the nine-valued std_logic with 0, 1, Z, X, U, L, H, W and dash, plus resolution and type conversion rules.
  2. 11 Signals and Variables Understand the difference between VHDL signals and variables: when updates take effect, scheduled assignments, initial values, scope and which to choose.
  3. 12 Vectors, Arrays and Slices Work with VHDL buses: std_logic_vector ranges, indexing, slices, concatenation, aggregates with others, array types, 2D arrays and attributes like 'range and 'length.
  4. 13 Numeric Arithmetic with numeric_std Do arithmetic in VHDL the standard way with numeric_std: unsigned and signed types, to_unsigned, to_integer, resize, overflow, comparisons and shifting.
  5. 14 Subtypes, Enumerations and Records Define your own VHDL types: subtypes with constraints, enumerations for states and opcodes, records for grouped signals, type attributes and encoding choices.

Concurrent and Sequential Code

  1. 15 Concurrent Signal Assignments Describe combinational logic in VHDL with concurrent assignments: simple, conditional when/else and selected with/select assignments, multiplexers, decoders and priority logic.
  2. 16 Processes and Sensitivity Lists Master the VHDL process: how it wakes up, sensitivity lists and process(all), combinational and clocked processes, rising_edge, resets, wait statements and latch traps.
  3. 17 if, case and Loops in VHDL Write sequential VHDL: if/elsif/else, case with when others, for and while loops, exit and next, and how loops unroll into hardware instead of running over time.
  4. 18 Generate Statements Create repeated and optional hardware in VHDL with for-generate and if-generate: instance arrays, bus bit-slices, generic-controlled features and case-generate in VHDL-2008.
  5. 19 Delta Cycles and Simulation Time Understand how VHDL simulation works: simulation time, delta cycles, signal update phases, race-free clock-domain behavior, inertial and transport delays and glitches.

Finite State Machines

  1. 20 Finite State Machines: Moore and Mealy Learn what a finite state machine is, how Moore and Mealy machines differ, how to draw state diagrams and how the idea maps onto VHDL registers and logic.
  2. 21 The Two-Process FSM Style Write a clean VHDL state machine with an enumeration type, a clocked state register process and a combinational next-state process, plus a traffic light example.
  3. 22 State Encoding and Safe Machines Compare binary, one-hot and Gray state encodings in VHDL FSMs, see how many flip-flops each needs and how to recover from illegal states after a glitch.
  4. 23 A Sequence Detector FSM Design a serial 1011 sequence detector in VHDL as a Mealy and Moore FSM, with state diagram, overlapping detection, and runnable C stand-ins to test it.

Testbenches

  1. 24 Your First VHDL Testbench Learn what a VHDL testbench is: an entity with no ports, a device under test, signals, stimulus and a simulation clock, with a runnable C model of simulated time.
  2. 25 Stimulus, Wait and Assert Use wait for, wait until, wait on, assert and report with severity levels to drive inputs and check outputs automatically in a VHDL testbench.
  3. 26 Clocks, Reset and Self-Checking Testbenches Generate a clock, apply reset, drive a synchronous design and compare it with a reference model in a self-checking VHDL testbench that ends with PASS or FAIL.
  4. 27 Procedures, Test Vectors and Debugging Structure big VHDL testbenches with procedures, read test vectors from files with textio, debug simulation with waveforms and fix the usual X and U problems.

Synthesis and FPGA

  1. 28 What Synthesis Does Understand what logic synthesis does with VHDL: the synthesizable subset, elaboration, optimization and technology mapping to LUTs and flip-flops, with C models.
  2. 29 Inferred Hardware: Registers, Latches and Memories See how VHDL code styles infer flip-flops, latches, multiplexers, shift registers and block RAM, and how to avoid accidental latches with complete assignments.
  3. 30 Timing and Constraints Learn setup and hold time, critical paths, clock period and slack, how to write a timing constraint, and how to shorten paths with registers in a VHDL design.
  4. 31 The FPGA Flow, Pins and Your First Board Follow the FPGA flow from VHDL to bitstream: synthesis, place and route, pin constraints, top-level wrapper, switch debouncing, and a first LED blink design.

Design Patterns

  1. 32 Pipelining for Speed Split long logic paths with pipeline registers in VHDL to raise the clock frequency, understand latency versus throughput and build a pipelined multiply-add.
  2. 33 Clock Enables and Clock-Domain Crossing Slow parts of a design with clock enables instead of derived clocks, and move signals between clock domains safely with two-flip-flop synchronizers and Gray code.
  3. 34 FIFOs and Ready/Valid Handshakes Design a synchronous FIFO in VHDL with full and empty flags, then connect producer and consumer with a ready/valid handshake so no data is lost or duplicated.

Projects and Practice

  1. 35 Project: A Traffic Light Controller Build a complete traffic light controller in VHDL: specification, FSM with per-state timers, pedestrian request, testbench plan and a runnable C model of the design.
  2. 36 Project: A UART Transmitter Design a UART transmitter in VHDL: frame format, baud-rate tick generator, shift-register FSM, ready/valid interface and a runnable C model that checks the bit stream.
  3. 37 Practice: An ALU and Exercises Design a parameterized ALU with flags in VHDL using numeric_std, check it against a C reference model, then work through twelve practice exercises with hints.