BitFlow

Binary counter

Six LEDs can show any number from 0 to 63 in binary. Keep a 6-bit register, add one to it four times a second and drive the LEDs from it.

When a 6-bit register holding 63 adds one, it wraps around to 0 by itself: the carry falls off the top.

lab.v
drag to turn · scroll to zoom

Loading the board…

Press Run on the board: your Verilog is turned into gates in this browser and runs here, cycle by cycle.

Goals

  • ○The LEDs count up by one each step
  • ○Four steps a second
  • ○It wraps from 63 back to 0
Hints
  1. Reuse the timer from Blink with CLK_HZ / 4.
  2. value <= value + 1; when the timer ends.

Pin log

Run the design to see its outputs change.

Put it on a real board

  • The clock is set to the board's 27 MHz, and its active-low buttons and LEDs are flipped for you.
Waveform