Counters in Verilog
This post will present the design of different types of counters in Verilog, up counter, up counter with load, Gray counter, one-hot counter and random number generator. A test bench model is also available to verify the operation of the counter.
1- Verilog code for simple 8 bit up counter:
2- Verilog code for 8 bit up counter with load:
3- Verilog code for Gray Code:
4- Verilog code for one-hot counter:
5- Linear feedback shift register:
6- Test Bench
Simulation Results :