BitFlow

Running light

Keep the position of the lit LED, 0 to 5, in a register, move it on ten times a second, and decode it: led = 6'b000001 << pos.

Registers start at 0 here and on a real FPGA, so starting with a position rather than a pattern means the light is there from the first moment.

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

  • ○Exactly one LED is on
  • ○The light moves on every 0.1 s
  • ○It wraps from LED 5 back to LED 0
Hints
  1. pos <= (pos == 5) ? 0 : pos + 1;
  2. A 3-bit pos holds 0–5.

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