Medium · Sequential logicYour digital design playground
Experiment with an enabled counter, or replace it with your own design. Edit the stimulus in tb.sv and inspect the resulting VCD waveforms.
Specification
- Inputs clk, reset, enable; output q is a 4-bit register.
- On each rising clock edge: reset clears q; otherwise enable increments q modulo 16.
- Hold q when enable is low. Reset is synchronous and active high.
64 supplied checksRun uses the testbench in tb.sv.
Practice results stay in this browser. They do not count as server-verified scores.
Language and tools
Choose Verilog 2005 or SystemVerilog 2012. Icarus supports a subset of SystemVerilog; classes, UVM and full SVA are outside this runtime. Download the project to continue in OSS CAD Suite with Icarus, Yosys and GTKWave.
Open-source credits and runtime provenance
Drag the dividers to resize. Focus a divider and use its arrow keys for precise adjustments.