Introduction To FPGA Programming
Introduction To FPGA Programming
University of Torino
Ph.D. in Physics
Fall 2020
Introduction to FPGAs
and Xilinx devices
From CPLDs to FPGAs
− gate array : array of ”logic cells” (more later) that can be programmed
to implement any desired logic functionality
− field programmable : device not committed to do something until
effectively programmed according to the field of application
flexible
− you can implement any digital function !
− reprogrammable
fast CAD-to-silicon prototyping cycle
− no need for mask-based production
− that is... no need to wait for years before looking at some nice waveforms
at the oscilloscope and making measurements in the lab !
de facto cheaper, safer and more relaxed business than making ASICs
− affordable per-unit costs (from ≈ 100 e for an ”entry level” evaluation
board to ≈ 1,500 e for a ”professional” evaluation board)
− cheaper (with free versions) and much simpler EDA softwares !
− no neurotic and mental exhaustion ”GDS submissions” to foundries
fast Engineering Change Orders (ECOs) if required
− ”respin” of a mapped RTL project in a few hours
Disadvantages of FPGAs
− full-custom − reconfigurable
− high performance − ”out of the box” solution
− low-power consumption (no layout, masks or other
manufacturing steps needed)
− expensive development tools
− slow compared to ASICs
− long and time-consuming
CAD-to-silicon prototyping − power hungry
cycle − fast CAD-to-silicon prototyping
− high development cost, but and quick time-to-market
cheaper on high volume − small development overhead,
production low-cost development tools
− highly bugs-prone (outside − per-unit cost low compared to
industry) ASICs, expensive on large-scales
− highest performance ! − no minimum quantity order
FPGA vendors
Other vendors :
− Actel (acquired by Microsemi Corporation in 2010)
− Lattice Semiconductor
− less known: QuickLogic, Achronix
Xilinx vs. (Intel) Altera
Xilinx and Intel Altera are de facto the two biggest FPGA manufacturers and vendors
available on the market :
− each vendor provides both ”the silicon” and ”the software” to program it
− once you choose a vendor you are tied up to use its own software†
(at least for the actual physical implementation)
− Xilinx software: Vivado (legacy ISE)
− Altera software: Quartus
− Quartus is much simpler and easier to use compared to Vivado
− when you move to High-Level Synthesis (HLS), Altera is far away with respect to Xilinx
− both companies offer free software versions including free IP cores for most of their devices
− OPEN DOCUMENTATION !
− both widely used in the Nuclear and High-Energy Physics (HEP) research communities
− the actual choice mainly due to each project history
− example: Xilinx extensively used in Torino INFN labs, while Altera in Pisa INFN labs
From now on we will focus only to Xilinx FPGA devices.
† HDL simulations can be performed with any digital simulator, including gate-level simulations with SDF.
In principle also synthesis can be performed using third-party tools, but place-and-route necessarily requires
to use the vendor software.
The (modern) Xilinx ”zoo”
7-series family
− 28 nm high-K metal gate CMOS technology
− Spartan-7 ⇒ Artix-7 ⇒ Kintex-7 ⇒ Virtex-7
− devices containing ”only” programmable logic
Different size, number of programmable logic cells, I/O capabilities, performance and cost
depending on the chosen device family :
https://www.xilinx.com/products/boards-and-kits/ek-k7-kc705-g.html
Example: Digilent Arty-A7 evaluation board
https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists
Example: Digilent Zybo-Z7 evaluation board
https://store.digilentinc.com/zybo-z7-zynq-7000-arm-fpga-soc-development-board
Xilinx FPGAs architecture overview
Reference documentation :
A
0 1 2 3 4 5
D B D B
C C
Programmable interconnections /2
Look-up tables (LUT) /1
x1 x2 F
x1
0 0 1
F (x1, x2)
0 1 0
x2
1 0 0
1 1 1
Look-up tables (LUT) /2
x1
0/1
0
1
0/1 0
F (x1, x2)
1
0/1
0
1
0/1
x2
Look-up tables (LUT) /3
x1
1
0
1
0
0
F (x1, x2)
1
0
0
1
1
x1 x2 F
x2 0 0 1
0 1 0
1 0 0
1 1 1
Logic Cell (LC)
Xilinx terminology :
− Logic Cell (LC) = 1x LUT + 1 register (FF) + programmable MUX
− LUT implemented as 6-inputs, 64-bit RAM
− slice = 4x LUTs + 8 registers (FFs) + MUXs + fast-carry chain (CLA)
− Configurable Logic Block (CLB) = 2x slices
− Basic Element (BEL) = any device primitive
Programmable I/O pads
I/O BLOCK
programmable pad
Design flow
Design Verification
Behavioral
Design entry (HDL)
Simulation
Synthesis
Gate-level
Implementation Simulation
(place-and-route)
Timing Analysis
Device programming
Gate-level (GL) simulations
library UNISIM ;
use UNISIM . VComponents . all ;