DigiFlop

One control bit decides whether the count climbs or falls.

Verilog Coding Exercise · Sequential
N-bit Up/Down Counter
One control bit decides whether the count climbs or falls.

A parameterized counter that increments or decrements on every clock edge depending on the up_down control signal — the parameter N makes it reusable at any bit width.

▶ Try the interactive version