Home / Learn Verilog / Binary Counter
Binary Counter
Count clock pulses.
In shortCount clock pulses.
What's actually going on
Definition
A counter adds 1 on each clock edge and wraps at its maximum.
Why you need this
Timing, addressing, dividers.
How it works
q <= q + 1 with reset.
Where you'll see this
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
4-bit counterVerilog: edit and run
After 16 counts it wraps to 0.
Test what you just read
1. A 4-bit counter has...
2^4.