2017 01 31 FPGA Lecture HS
2017 01 31 FPGA Lecture HS
2017 01 31 FPGA Lecture HS
Field Programmable
Gate Arrays
Hannes Sakulin
CERN / EP-CMD
OR gate q = a || b;
Exclusive OR gate A
Q q = a != b;
XOR gate B
…
Combinatorial logic (asynchronous)
Outputs are determined
by Inputs, only
A B Cin S Cout
0 0 0 0 0
1 0 0 1 0
0 1 0 1 0 Combinatorial logic may
1 1 0 0 1 be implemented using
Look-Up Tables (LUTs)
0 0 1 1 0
1 0 1 0 1
0 1 1 0 1
1 1 1 1 1
LUT = small memory
(Synchronous) sequential logic
set
D Flip-flop:
samples the data at the rising
data Output (or falling) edge of the clock
clock Inverted output The output will be equal to
the last sampled input until the
reset next rising (or falling) clock edge
+ =
Late 60’s
and flip-flops
Coarse grained
100’s of blocks, restrictive structure
(EE)PROM based
FPGAs …
FPGAs
(extremely flexible)
Clock trees guarantee that the clock arrives at the same time at all flip-flops
Clock Managers
Daughter clocks
may have multiple
or fraction
of the frequency
Embedded RAM blocks
Hard core
Processor core that is
available in addition to the
programmable resources
E.g.: Power PC, ARM
General-Purpose Input/Output (GPIO)
Intel, 1971
EEPROM and FLASH Technology
Electrically Erasable Programmable Read Only Memory
Rad-tolerant
secure
Rad-tolerant
(e.g. Alice)
Used in most
FPGAs
Design Considerations (SRAM Config.)
Configuration at power-up
stores
Flash single or
PROM multiple
designs
JTAG
Flash connector
PROM
FPGA
( SRAM based )
...
Flash
PROM FPGA PCI, VME
JTAG bus
FPGA
( SRAM based )
...
Microsemi (Actel)
Anti-fuse FPGAs
Flash based FPGAs (Formerly )
Mixed Signal
Lattice Semiconductor
SRAM based with integrated Flash PROM
low power
Trends
Ever-decreasing feature size
Higher capacity
Higher speed
Lower power
consumption
130 nm
Xilinx Virtex-2
Xlinix Zynq
Altera Stratix 10
Common HDLs
VHDL
Verilog
AHDL ( Altera specific )
Newer trends
C-like languages (handle-C, System C)
Labview
Example: VHDL
Looks like a
programming
language
All statements
executed in
parallel, except
inside
processes
Schematics & HDL combined
Design flow
Core Generator Intellectual Property
Schematics State
constraints VHDL / Verilog cores
Machines
Pins Processors
Timing Counters Interfaces
FIFOs Controllers
Area
… …
…
Behavioral
Synthesis Simulation
Timing
Simulation
Programming file
Floorplan (Xlinx Virtex 2)
Manual Floor planning
N beam crossings
Trigger decision YES / NO
(for every beam crossing )
De-
randomizer Latency should be short
FIFO
In order to limit the length
of the delay FIFOS
Pipelined Logic
Processing Processing Processing Trigger
data from data from data from decision
beam beam beam for beam
crossing crossing crossing crossing
4 3 2 1
...
Combinatorial logic
Flip flop
Clocked with same clock as collider
Pipelined Logic – a clock cycle later
Processing Processing Processing Trigger
data from data from data from decision
beam beam beam for beam
crossing crossing crossing crossing
5 4 3 2
...
Combinatorial logic
Flip flop
Clocked with same clock as collider
Why are FPGAs ideal for First-Level Triggers ?
Many inputs
Data from many parts of the detector
has to be combined
360 Gb/s
36 x
10 Gb/s
Rx
Tx
Rx
Tx
SLINK (ATLAS)
DDL (ALICE)
Example 3: CMS Front-end Readout Link (Run-1)
SLINK Sender Mezzanine
Card: 400 MB / s
1 FPGA (Altera)
CRC check
Automatic link test
10 Gb/s TCP/IP
SLINK-64 input
LVDS / copper
You are going to design the digital electronics inside this FPGA !
For the real die-hards: Secret Lab 14
Z-turn board
Zynq w. dual-core ARM