FPGA Design

FPGAs are reconfigurable chips made of logic blocks, memories and DSP slices connected by programmable routing. Learn LUTs and flip-flops, CLBs, block RAM, DSP slices, clocking (PLLs/MMCMs), the FPGA flow (synthesis, implementation, bitstream), timing constraints, resource estimation, and SoC FPGAs.

FPGAs let you build custom hardware without fabricating a chip — used for prototyping ASICs, low-volume products, networking, radar, video processing and AI acceleration. Designs can be updated in the field.

An analogy

An FPGA is like a huge LEGO board: the bricks (LUTs, flip-flops, RAM, DSP) are fixed, but you can connect them in any pattern and rebuild whenever you like.

Architecture

Configurable logic blocks contain 6-input LUTs (any 6-input function), flip-flops and carry chains. Block RAMs (18/36 Kb), DSP slices (e.g. 27 × 18 multipliers), clock managers (PLL/MMCM), I/O banks with SerDes transceivers.

Design flow

RTL → synthesis (map to LUTs/FFs) → implementation (place and route) → timing analysis → bitstream → program via JTAG or flash. Vivado (AMD/Xilinx), Quartus (Intel/Altera), Libero (Microchip), open-source Yosys/nextpnr.

Timing closure

Critical paths are LUT levels plus routing delay. Pipelining, register duplication, floorplanning and proper constraints raise f_max. Check WNS ≥ 0 and no hold violations.

SoC FPGAs and HLS

Zynq and Agilex SoCs combine ARM cores with FPGA fabric. High-level synthesis (Vitis HLS) converts C++ to RTL. Partial reconfiguration swaps functions at runtime. Power, security (bitstream encryption) and radiation (space) are advanced concerns.

Formulas

Worked example: Path delay

Given: t_cq 0.3 ns, 3 LUT levels × (0.4 ns LUT + 0.5 ns routing), t_su 0.1 ns

Find: f_max.

Answer: ≈ 323 MHz

Worked example: Block RAM count

Given: Buffer 32 768 × 32 bits; BRAM36 configured 1K × 36

Find: BRAMs.

Answer: 32 BRAM36 blocks (1 Mbit)

Timing constraints (XDC/SDC) for an FPGA design

# 100 MHz board oscillator
create_clock -name sys_clk -period 10.000 [get_ports clk_100m]

# Generated 200 MHz clock from the MMCM is derived automatically in Vivado.
# Inputs arrive 2 ns after the clock edge from an external ADC
set_input_delay  -clock sys_clk 2.0 [get_ports {adc_data[*]}]
set_output_delay -clock sys_clk 1.5 [get_ports {dac_data[*]}]

# Asynchronous reset button: do not time it
set_false_path -from [get_ports btn_rst]

# Pin assignments
set_property PACKAGE_PIN W5  [get_ports clk_100m]
set_property IOSTANDARD LVCMOS33 [get_ports clk_100m]

Constraints tell the tools the clock frequency and I/O timing so implementation optimises the right paths. Without them, a design may pass simulation yet fail on hardware.

Common mistakes

Applications

Key takeaways

Going further