Practice

VHDL practice problems

Each problem here ships a VHDL testbench of its own, so a VHDL design is graded natively, not translated. You write the design for the given entity, and GHDL simulates it against the tests.

222 problems49 free to solve51 easy, 115 medium, 56 hard

The same problems accept Verilog and SystemVerilog, which makes them a direct way to compare how one design reads in each language.

What these problems cover

  • Processes, signals and variables
  • std_logic, std_logic_vector and numeric_std arithmetic
  • Clocked processes, resets, counters and shift registers
  • State machines with enumerated types
  • Datapath and memory blocks

Free to start

Solve these with a free account. Every other statement on this page is free to read.

Problems by track

Verilog Syntax and Language Basics20

8 more in the Verilog Syntax and Language Basics track

Combinational RTL12

Sequential RTL22

10 more in the Sequential RTL track

FSM Coding15

3 more in the FSM Coding track

Synthesis Intuition17

5 more in the Synthesis Intuition track

Datapath Design25

13 more in the Datapath Design track

Memory and Storage24

12 more in the Memory and Storage track

Pipelining18

6 more in the Pipelining track

Interfaces and Protocols19

7 more in the Interfaces and Protocols track

SystemVerilog RTL9

Clock Domain Crossing and Synchronization32

20 more in the Clock Domain Crossing and Synchronization track

Debug and Verification4

Interview Circuit5

How your answer is checked

VHDL submissions are analyzed and simulated by GHDL in VHDL 2008 mode against the problem's VHDL testbench. You get each test's expected and actual value and the waveform of the run.

Questions

Which VHDL standard is used?
VHDL 2008, through GHDL.
Why do only some RTL problems offer VHDL?
Verilog and VHDL cannot share a testbench, so VHDL is offered on a problem only once a VHDL testbench has been written and checked for it. This page lists the problems that have one.
Does the FSM view work for VHDL?
The state diagram is drawn for VHDL designs. GHDL's waveform skips enumerated signals, so a VHDL state machine gets the diagram but not the per clock state trace.