BitFlow

Light an LED

An FPGA is a chip full of logic you wire up with code. Each output of your module is connected to a pin, and on the lab board pins led[0] to led[5] drive six LEDs.

assign connects an output to a value for good: it is a wire, not a step that runs once. 6'b000001 is a 6-bit number written in binary, and bit 0 is the rightmost.

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

  • ○LED 0 is on
  • ○LEDs 1–5 are off
Hints
  1. Change the value in the assign so only the last bit is 1.
  2. assign led = 6'b000001;

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