Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 37 ยท Getting Started

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.

Writing VHDL is only one step of a longer journey. A typical hardware project moves through a pipeline: you write code, check it in simulation, let a synthesis tool turn it into gates, and finally program a chip. Knowing the stages helps you read error messages, because every tool complains about different things.

This lesson walks through the stages and the tools you will meet. The tools themselves cannot run on this website, so the commands are shown read-only; the two runnable programs are C stand-ins that model what a simulator and a synthesis netlist do.

The stages

  1. Specification. What should the circuit do, what are its inputs and outputs, how fast must it run?
  2. Design entry. You write VHDL files (.vhd).
  3. Analysis (compile). The tool checks syntax and types and stores each design unit in a library.
  4. Elaboration. The tool builds the hierarchy: it connects instances of components, fixes generic values and creates one big model.
  5. Simulation. A testbench drives inputs and you watch outputs, usually as waveforms.
  6. Synthesis. The code is translated into a netlist of logic gates, flip-flops and memory blocks.
  7. Implementation. Place and route maps the netlist onto the actual chip and checks timing.
  8. Bitstream and programming. A file that configures the FPGA is generated and loaded onto the board.

From code to chip

Write .vhd source files
Simulate Testbench and waveforms
Synthesize Gates and flip-flops
Program Bitstream to the FPGA

Simulate first. Hardware debugging is much slower.

1 / 2

Always simulate before synthesizing. In simulation you can see every internal signal and re-run in seconds. On the real chip you can see almost nothing.

Common tools

Tool What it does Cost
GHDL Open-source VHDL analyzer and simulator Free
GTKWave Waveform viewer for GHDL output Free
ModelSim / Questa Commercial simulator, widely used in industry Paid (free student editions exist)
Vivado AMD (Xilinx) FPGA tool: simulator, synthesis, implementation Free edition for many devices
Quartus Prime Intel (Altera) FPGA tool chain Free Lite edition
Yosys + nextpnr Open-source synthesis and place-and-route for some FPGAs Free

A good way to start is GHDL plus GTKWave on your own computer, no FPGA board needed.

A minimal GHDL session

Assume you saved a design in half_adder.vhd and a testbench in half_adder_tb.vhd. These commands are typed in a terminal on your machine, not on this site:

Terminal
ghdl -a --std=08 half_adder.vhd        # analyze (compile) the design
ghdl -a --std=08 half_adder_tb.vhd     # analyze the testbench
ghdl -e --std=08 half_adder_tb         # elaborate the top-level entity
ghdl -r --std=08 half_adder_tb --wave=out.ghw   # run and record waveforms
gtkwave out.ghw                        # look at the waveforms

The order matters: a file must be analyzed after every file it depends on. In larger projects a Makefile or a script keeps this order for you. The --std=08 option selects VHDL-2008, which is the version this course assumes unless we say otherwise.

What a simulator really does

VHDL simulators are event driven. They keep a queue of events ("signal clk becomes 1 at 10 ns") sorted by time, always take the earliest one, apply it, and re-run only the statements whose inputs changed. The following stand-in is a tiny model of that loop: a clock toggles every 5 ns, and a "register" output follows on every rising edge.

C Stand-in (C): an event queue simulator

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Notice that the count update is scheduled 1 ns later. Real simulators schedule updates a tiny "delta" step later, a detail that matters a lot and gets its own lesson, Delta Cycles and Simulation Time.

What synthesis really does

A synthesizer turns your description into a netlist: a list of primitive cells and the nets between them. The second stand-in evaluates a small netlist, a 1-bit full adder, stored as data, to show that after synthesis the "program" is just wiring.

C Stand-in (C): evaluating a gate netlist

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

If you have no board, you can still learn everything in this course with GHDL and GTKWave. Add a board later; the VHDL you write is the same.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which stage builds the design hierarchy by connecting component instances and applying generic values?

    Analysis checks and stores each unit; elaboration creates the full hierarchy before simulation or synthesis.
  2. 2. What does ghdl -a design.vhd do?

    The -a option analyzes the source. -e elaborates and -r runs.
  3. 3. Why should you simulate before synthesizing?

    Visibility and fast iteration make simulation the cheapest place to find bugs.
  4. 4. How does an event-driven simulator decide what to do next?

    Events are sorted by time; the simulator applies the earliest one and re-evaluates only what depends on it.

Summary

  • The flow is specification, entry, analysis, elaboration, simulation, synthesis, implementation and programming.
  • GHDL with GTKWave is a free way to start; Vivado and Quartus cover FPGA implementation.
  • GHDL commands: -a analyze, -e elaborate, -r run.
  • Simulators are event driven; synthesis produces a netlist of primitive cells.
  • Always simulate first.

Next: Your First Design: The Half Adder