Practice

Verilog practice problems

Every problem here is a module to write: a port list, a spec and a testbench that checks it. You write the RTL in the browser and it runs on a real simulator, the same way it would on your own machine.

240 problems53 free to solve53 easy, 118 medium, 69 hard

The problems are grouped by track and ordered the way the track teaches them, from continuous assignments and always blocks to FSMs, pipelines and clock domain crossing.

What these problems cover

  • Module structure, ports, vectors, concatenation and parameters
  • Combinational always blocks and avoiding inferred latches
  • Flip flops, resets, counters and shift registers with nonblocking assignments
  • FSMs in one, two and three always block styles
  • Datapaths, memories, FIFOs and pipelines
  • Synchronizers and async FIFOs across clock domains

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 Basics25

13 more in the Verilog Syntax and Language Basics track

Combinational RTL14

2 more in the Combinational RTL track

Sequential RTL26

14 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 RTL14

2 more in the SystemVerilog RTL track

Clock Domain Crossing and Synchronization33

21 more in the Clock Domain Crossing and Synchronization track

Debug and Verification5

Interview Circuit5

How your answer is checked

Your module is compiled with Icarus Verilog and simulated against the problem's testbench. The result lists every test with the value you produced and the value expected, and the waveform shows where they part. Yosys synthesizes the same code, so you can see the schematic and the cell count of what you wrote.

Questions

Do I need to install a simulator?
No. The editor, the simulator and the synthesis view run on Codiode. You need a laptop or desktop browser; on a phone you can read a problem but not solve it.
Which Verilog standard is used?
Verilog submissions compile as Verilog 2005. You can switch the editor to SystemVerilog on any problem, and to VHDL on the problems that offer it.
Are these problems free?
The first problems of every track are free with an account, and every problem statement is free to read. The rest of the catalog is part of Codiode Pro.