SystemVerilog practice problems
These problems use the parts of SystemVerilog that synthesize: the logic type, always_ff and always_comb, typedef enum for states, structs, packed arrays and parameterized modules.
20 problems7 free to solve4 easy, 11 medium, 5 hard
Any RTL problem on Codiode accepts SystemVerilog, so once these are done the whole Verilog catalog is open to you in SystemVerilog too. The ones listed here are the problems written around SystemVerilog features.
What these problems cover
- logic, always_ff, always_comb and always_latch
- Strongly typed enums for state machines, and casts to and from them
- Packed and unpacked arrays and structs
- Interfaces and modports
- unique and priority case
- Parameters, $clog2 and generate blocks
Free to start
Solve these with a free account. Every other statement on this page is free to read.
Problems by track
SystemVerilog RTL15
- Packed Array Endianness Extraction
- Unpacked Array Memory Initialization
- Mixed Array Memory Mapping
- Packed Struct Instruction Decoder
- Struct Field Updating and Assignment
- Explicit One Hot Encoding
- Basic Interface Grouping
- Bit Stream Cast to Packed Struct
- Localparam Derivation with Clog2
- Parameterized Struct Widths
- Generate If Optional Pipeline Stage
- Recursive Generate Reduction Tree
Combinational RTL1
Sequential RTL2
FSM Coding1
Interview Circuit1
How your answer is checked
SystemVerilog submissions compile with Icarus Verilog in its SystemVerilog mode (-g2012) and run against the problem's testbench. You get each test's expected and actual value, the waveform, and the Yosys schematic of your design.
Questions
- Can I solve the Verilog problems in SystemVerilog?
- Yes. Every RTL problem lets you pick Verilog or SystemVerilog in the editor, and the same testbench grades both.
- Is this SystemVerilog for verification?
- These problems are design problems: you write the module. Classes, constrained random and UVM are not covered here.
- Which simulator runs my code?
- Icarus Verilog with -g2012. It supports the synthesizable subset these problems use; a few verification only constructs are not available.