FPGA Lecture SERC NISER
FPGA Lecture SERC NISER
M a n d a kini Patil
EHEPgroup
DHEP TIFR
SERC school
NISER, Bhubaneshwar
Nov 7-27 2017
Outline
Digital electronics
Short history of programmable logic devices
The internals of an FPGA
Programming techniques
Example Applications
Design flow
What is a Field Programmable Gate Array ?
A quick answer for the impatient
An FPGA is an integrated circuit
Mostly digital electronics
An FPGA is programmable in the field (=outside the factory),
hence the name “field programmable”
Design is specified by schematics or with a hardware description
language
Tools compute a programming file for the FPGA
The FPGA is configured with the design
Your electronic circuit is ready to use
With an FPGA you can build electronic circuits …
… without using a soldering iron… without
plugging together existing modules
… without having a chip produced at a factory
Introduction to digital
electronics The building
blocks: logic gates
Truth table Exclusive
OR gate
XOR gate
C equivalent
AND gate
q = a && b;
OR gate
q = a || b;
q = a != b;
Combinatorial
logic
(asynchronous)
Outputs are determined by
Inputs, only
D Flip-flop:
set samples the data at the rising
(or falling) edge of the clock
data Output
+ =
Using Look-Up-Tables and Flip-Flops any
kind of digital electronics may be implemented
Of course there are some details to be
learnt about electronics design …
Programmable
digital electronics
Long long time ago …
Ever-decreasing feature size
Higher capacity
Higher speed
Lower power
cons umption
130 nm
Xilinx Virtex-2
and flip-flops
Coarse grained
100’s of blocks, restrictive structure
FPGAs
ASIC FPGA
You can get started with a $200 Extremely high development cost
development board and free ASICs are produced at a semiconductor
software fabrication facility (“fab”) according to
your design
Rapid development cycle
(minutes / hours) Long development cycle
(weeks / months)
May be reprogrammed in the
Design cannot be changed once it is
field (firmware upgrade)
produced
New features
Bug fixes Better radiation hardness
Flip-Flop
registers the LUT output
May use only the LUT or only the Flip-flop
LUT may alternatively be configured as a shift
register
Additional elements (not shown): fast carry logic
Digital Signal Processor (DSP)
Embedded Multipliers
Soft and Hard Processor Cores
Clock Trees
Clock Managers
System-On-a-Chip (SoC) FPGAs
Xlinix Zynq
Altera Stratix 10
Antifuse Technology
SRAM-Based Devices
Intel,1971
EEPROM Technology
Erasable Programmable Read Only Memory
Major Manufacturers
Xilinx
First company to produce FPGAs in 1985
About 50% market share, today
SRAM based CMOS devices
Altera
About 30% market share
SRAM based CMOS devices
Actel
Anti-fuse FPGAs
Flash based FPGAs
Mixed Signal
Lattice Semiconductor
Hardware Description Language
Looks similar to a programming language
B U T be aware of the difference
Programming Language => translated into machine
instructions that are executed by a CPU
HDL => translated into gateware (logic gates & flip-flops)
Common HDLs
VHDL
Verilog
AHDL ( Altera specific )
Newer trends
C-like languages (handle-C, System C)
Labview
Development Tools
Different Steps in Implementation
entity DelayLine is!
generic (!
n_halfcycles : integer := 2);!
port (!
x : in std_logic_vector;!
x_delayed : out std_logic_vector;!
clk : in std_logic);!
F PG A Serial bit-stream
( S R A M based ) (may be encrypted)
Flash
PROM FPG A PCI, VME
JTAG bus
F PG A
( S R A M based )
...
The JTAG bus may be driven by an FPGA
which contains an interface to a host PC
via PCI or V M E
Firmware can then be updated from the PC
FPGA APPLICATIONS in HEP
and
Other Domain
Why are FPGAs ideal for First-Level Triggers ?
It merges different measurements for the same muon and finds the best 4 over-all muon candidates
CMS Global Muon Trigger main FPGA
Example 4: CMS Readout Link for Run-2 in use
since 2015
Myrinet NIC
10 Gb/s TCP/IP replaced by
custom-built
card
(“FEROL”)
1 FPGA (Xilinx) :
Merging logic (1 µs
latency)
Monitoring logic
Interface to SRAM
SLINK Sender Mezzanine
Card: 400 M B / s
1 F PGA (Altera)
C R C check
Automatic link test
360 Gb/s
36 x
10 Gb/s
Rx
Tx
Rx
Tx
Software-Defined Radio
Aerospace
Defense
FPGAs in other domains
Medical imaging ASIC Prototyping
Aerospace / Defense
Server processors w. FPGA
Bitcoin mining
You are going to design the digital electronics using this FPGA
board !
THANK YOU
VHDL has roots in the Ada programming language
in both concept and syntax, while
Verilog's roots can be tracked back to an early
HDL called Hilo and the C programming language.