Your First FPGA Project
From code to blinking LED
This is it: everything you have learned comes together in one project. Logic gates, flip-flops, counters, HDL, synthesis, place and route - all of it converges here, in the simplest possible design that touches every part of the FPGA workflow.
You are going to build an LED blinker: a counter that toggles an LED on and off. It is the "Hello World" of FPGA design, and by the end of this lesson you will understand every step from writing code to seeing hardware respond.
The LED Blinker Journey
Walk through all four stages of building an FPGA project, from writing the code to watching the LED blink:
Step by Step
Step 1: Write the HDL. The entire design is a 24-bit counter driven by the board's clock. On every rising clock edge the counter increments by one. We assign the most significant bit, counter[23], to the LED output. Because bit 23 toggles once every 223 clock cycles, a 100 MHz clock produces a blink rate of about 100,000,000 / 224 ≈ 6 Hz, a comfortable visible blink.
Step 2: Write the constraints. The constraints file maps your logical signal names to physical pins on the FPGA package. On a Digilent Basys 3 (Xilinx Artix-7), the 100 MHz oscillator connects to pin E3 and the first LED is at pin H5. Without this file the tools have no idea which physical wires to use.
Step 3: Build the design. Click "Run" in your FPGA IDE (Vivado for Xilinx, Quartus for Intel). The tool chain synthesizes your HDL into LUTs and flip-flops, places them onto the chip, routes the wires between them, checks timing, and generates a bitstream file. For a design this small, it takes under a minute. The resource report will show you used about 24 LUTs and 25 flip-flops out of tens of thousands available.
Step 4: Program and run. Connect your board via USB, send the bitstream, and the LED starts blinking immediately. No operating system, no boot sequence, just hardware running at clock speed.
Recommended Starter Boards
- Digilent Basys 3 (Xilinx Artix-7) - the most popular teaching board, ~$150
- Terasic DE10-Lite (Intel MAX 10) - affordable, well-documented, ~$85
- Lattice iCEstick (iCE40) - tiny, cheap ($25), great for open-source toolchains
What to Do Next
Once your LED blinks, try these progressions: change the counter width to make it blink faster or slower. Add more LEDs and assign different counter bits to create a binary counting display. Add a button input that resets the counter. Then try building a simple state machine. You already have all the knowledge you need.
Why This Matters
You have completed the journey from theory to practice. Every concept in this course (gates, flip-flops, counters, state machines, LUTs, timing, HDL, and the design flow) was present in this one small project. The LED blinker proves that you understand not just the individual pieces, but how they all fit together.
Real FPGA projects are larger, but the workflow is identical. Whether you are building a video processor, a network packet parser, or a motor controller, you will always write HDL, constrain pins, synthesize, place and route, and program the board. The scale changes; the process does not.
Frequently Asked Questions
How do I start my first FPGA project?
Start with an LED blinker, the "Hello World" of FPGA design. You need: (1) An FPGA development board (popular choices: Digilent Basys 3, Terasic DE10-Lite). (2) The vendor's free IDE (Xilinx Vivado or Intel Quartus). (3) A Verilog or VHDL file describing a counter that toggles an LED. (4) A constraints file mapping your design's I/O to the board's physical pins. Build, program, and watch the LED blink.
What is a constraints file?
A constraints file tells the FPGA tools how your design connects to the physical world. It maps logical signal names in your HDL (like "clk" and "led") to physical pin numbers on the FPGA package. It also specifies clock frequencies and timing requirements. Without constraints, the tools would not know which physical pin to use for each signal. Xilinx uses .xdc files; Intel uses .sdc and .qsf files.
How do I program an FPGA?
After place and route, the tools generate a bitstream file, a binary blob that configures every LUT, flip-flop, and routing switch in the FPGA. You transfer this bitstream to the FPGA through a USB-JTAG cable using the vendor's programming tool. The FPGA configures in milliseconds and your circuit starts running immediately. Note: most FPGAs are volatile, meaning the configuration is lost when power is removed, so boards typically include flash memory to reload it at power-up.
Quick Check
Test your understanding of the key concepts from this lesson.





