Fpga handout

A
Introduction aux FPGA
Introduction aux FPGA
Mickaël Dardaillon
M2RTS
16/11/2011
Introduction aux FPGA
Introduction
Hiérarchie
Circuits Logiques
ASICCircuits programmables
FPGACPLD
Processeurs
DSPmicro-contrôleursCPU
Définitions
CPU : Computer Processing Unit
DSP : Digital Signal Processor
CPLD : Complex Programmable Logic Device
FPGA : Field Programmable Gate Array
ASIC : Application Specific Integrated Circuit
Introduction aux FPGA
Introduction
ASIC
Développement long
Coût de fabrication (en
augmentation)
Full custom : Performances
maximales
Fabrication grande série
FPGA
Développement rapide
Coût à l’unité (en
diminution)
Contraint par la technologie
du FPGA
Prototypage rapide
Introduction aux FPGA
Introduction
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Rappels sur les circuits intégrés
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Rappels sur les circuits intégrés
Le transistor MOS
MOS : Metal Oxide Semiconductor
Composant électronique de base
Porte logique ON/OFF
Canal
Drain
Grille
SourceMétal
Oxyde
Semi−conducteur
Introduction aux FPGA
Rappels sur les circuits intégrés
Technologie CMOS
CMOS : Complementary MOS
Niveaux logiques
0 = 0V
1 = 3V
Deux types de MOS
nMOS : conducteur si la grille=1
pMOS : conducteur si la grille=0
Puissance dissipée
P ∝ CV 2
f
C : Capacité d’un MOS
V : Tension sur la grille
f : Fréquence de fonctionnement
Types de MOS
nMOS
source
grille g=1
drain
pMOS
source
grille g=0
drain
Exemples
1
xx
0
Inverseur porte NAND
1
y
(xy)
x
x
y
0
Introduction aux FPGA
Rappels sur les circuits intégrés
Portes élémentaires
Amplificateur :
x F
F = x
x F
0 0
1 1
ET :
F
x
y
F = x y
x y F
0 0 0
0 1 0
1 0 0
1 1 1
Inverseur :
x F
F = x
x F
0 1
1 0
NON ET :
y
x F
F = x y
x y F
0 0 1
0 1 1
1 0 1
1 1 0
Introduction aux FPGA
Rappels sur les circuits intégrés
Conception de circuit combinatoire
1. Description du problème :
Addition entre deux bits
a et b et une retenue c
2. Table de vérité :
entrées sorties
a b c S cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
3. Équations logiques :
S = abc + abc + abc + abc
cout = abc + abc + abc + abc
4. Équations simplifiées :
S = (a ⊕ b) ⊕ c
cout = ab + (a ⊕ b)c
5. Portes logiques :
A
B
C
S
Cout
Introduction aux FPGA
Rappels sur les circuits intégrés
Logique séquentielle
Bascule RS
Q
Bascule RS
S
R
Q S R Q Q
0 1 0 1
1 1 interdit interdit
1 0 1 0
0 0 Qn−1 Qn−1
Bascule D : mémorise D lorsque l’horloge passe à ’1’
Valeur
0011
01
00
00
11
11
00001111
Horloge
Donnée
Valeur
Introduction aux FPGA
Structure matérielle
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Structure matérielle
Structure générale
Ressources globales
logique programmable
routage programmable
générateur d’horloge programmable
entrée/sortie programmable
mémoire RAM (sur certains circuits)
+ mémoire de configuration
bloc de configuration
Introduction aux FPGA
Structure matérielle
Structure générale
Routage des signaux
matrice de routage
bloc logique
canaux généraux
connection longue distance
point de routage
connection directe
Introduction aux FPGA
Structure matérielle
Structure générale
Génération d’horloge
Les horloges sont distribuées dans l’ensemble du FPGA par des
circuits de routage spécifique, aucun travail de la part du
concepteur !
DCM
BUF
CLK
CLKFB
CTRL
CLK0
CLK90
CLK180
CLK270
CLKx2
CLK180x2
CLKDIV
STATUS
DCM
signal
interne
vers distribution par zone
plots d’horloge
Introduction aux FPGA
Structure matérielle
Structure générale
Entrées / Sorties
Il existe plusieurs niveaux de tensions d’entrée / sortie, qui sont à
prendre en compte pour :
La conception de la carte (compatibilité entre composants)
Les contraintes de routage (technologie à utiliser sur I/O)
TTL CMOS TTL/CMOS CMOS 3V
0.8 V
0.4 V
2.7 V
0.5 V
3.5 V
1.0 V
4.5 V
3.9 V
0.8 V
0.4 V
0.8 V
0.4 V
2.4 V
3.3 V
0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V
2.0 V2.0 V2.0 V
5.0 V 5.0 V 5.0 V 5.0 V 5.0 V 5.0 V
3.3 V
5 V
4 V
3 V
2 V
1 V
0 V
0
1
1
0
x
porte
inV Vout
1
1
0
0
x
0
x
0
0
x
0
1
1
1 1
Introduction aux FPGA
Structure matérielle
Cellules élémentaires
Composants logiques
Chaque constructeur définit sa propre cellule de base, qui varie
selon les familles de FPGA.
Les cellules élémentaires :
Portes logiques configurables : fonctions de base (AND, OR...)
Registres : mémoire et synchronisme
Les composants matériels (hardcore) :
Logique complexe : additionneurs, multiplieurs...
Mémoire RAM
Processeurs (ARM, PowerPC...)
Les composants logiciels (softcore) :
UART, USB, contrôleur d’écran...
Processeurs (ARM, RISC...)
FFT, JPEG, SHA-1...
...
Introduction aux FPGA
Structure matérielle
Cellules élémentaires
Xilinx Virtex 4 : Slice
!"#$%&'#()*+%,-!'./$01%/23"#+03+*20%.03/40%3/(%.0%35($#10201%36/$$#37
!()*+,-+.+/(012(3('4+4(5)$50+"3+5+6(2(78+9($:'8;<+!=>.+/2(?'
!"#$%&'(
)*+
,-.
!"#$%&'(
)*+
,/.
0*1/1
0*1/2
34#'567'#8(
9$:(8944;(
<=>#8
?
@)A
?
@)A
B
B
@C
@C
DE
DE
F0*1
10*1
Introduction aux FPGA
Structure matérielle
Cellules élémentaires
Altera Stratix 5 : ALM (Adaptative Logic Module)
In addition to the adaptive LUT-based resources, each ALM contains four
programmable registers, two dedicated full adders, a carry chain, a shared arithmetic
chain, and a register chain. Through these dedicated resources, an ALM can efficiently
implement various arithmetic functions and shift registers. Each ALM drives all types
of interconnects: local, row, column, carry chain, shared arithmetic chain, register
chain, and direct link. Figure 1–5 shows a high-level block diagram of the Stratix V
ALM.
Figure 1–5. High-Level Block Diagram of the Stratix V ALM
datac
datad
datae1
dataf1
adder1
datae0
dataf0
dataa
datab
carry_in
carry_out
Combinational/Memory ALUT0
6-Input LUT
6-Input LUT
shared_arith_out
shared_arith_in
Combinational/Memory ALUT1
adder0
reg_chain_in
D Q
reg0
labclk
To general or
local routing
To general or
local routing
D Q
reg1
To general or
local routing
To general or
local routing
D Q
reg2
D Q
reg3
To general or
local routing
To general or
local routing
To general or
local routing
To general or
local routing
reg_chain_out
Introduction aux FPGA
Structure matérielle
Cellules élémentaires
Actel Pro Asic 3 : VersaTile
ProASIC3 Flash Family FPGAs
Refer to Figure 1-3 for VersaTile configurations.
User Nonvolatile FlashROM
ProASIC3 devices have 1 kbit of on-chip, user-accessible, nonvolatile FlashROM. The FlashROM can
be used in diverse system applications:
• Internet protocol addressing (wireless or fixed)
• System calibration settings
• Device serialization and/or inventory control
• Subscription-based business models (for example, set-top boxes)
• Secure key storage for secure communications algorithms
Figure 1-3 • VersaTile Configurations
X1
YX2
X3
LUT-3
Data Y
CLK
Enable
CLR
D-FF
Data Y
CLK
CLR
D-FF
LUT-3 Equivalent D-Flip-Flop with Clear or Set Enable D-Flip-Flop with Clear or Set
Introduction aux FPGA
Structure matérielle
Composants matériels
Composants logiques
Chaque constructeur définit sa propre cellule de base, qui varie
selon les familles de FPGA.
Les cellules élémentaires :
Portes logiques configurables : fonctions de base (AND, OR...)
Registres : mémoire et synchronisme
Les composants matériels (hardcore) :
Logique complexe : additionneurs, multiplieurs...
Mémoire RAM
Processeurs (ARM, PowerPC...)
Les composants logiciels (softcore) :
UART, USB, contrôleur d’écran...
Processeurs (ARM, RISC...)
FFT, JPEG, SHA-1...
...
Introduction aux FPGA
Structure matérielle
Composants matériels
DSP Slice pour Virtex 4
Entrées 18 bits avec multiplication / accumulation sur 32
échantillons
FPGAs are efficient for digital signal processing (DSP) applications because they can
implement custom, fully parallel algorithms. DSP applications use many binary
multipliers and accumulators that are best implemented in dedicated DSP slices. All
7 series FPGAs have many dedicated, full-custom, low-power DSP slices, combining high
speed with small size while retaining system design flexibility. The DSP slices enhance the
speed and efficiency of many applications beyond digital signal processing, such as wide
dynamic bus shifters, memory address generators, wide bus multiplexers, and
memory-mapped I/O registers. The basic functionality of the DSP48E1 slice is shown in
Figure 1-1. For complete details, refer to Figure 2-1 and Chapter 2, DSP48E1 Description
and Specifics.
X-Ref Target - Figure 1-1
Figure 1-1: Basic DSP48E1 Slice Functionality
UG479_c1_21_032111
48-Bit Accumulator/Logic Unit
Pattern Detector
25 x 18
Multiplier
Pre-adder
B
A
D
C
P
+ / –
X
=
+
–
Introduction aux FPGA
Structure matérielle
Composants matériels
RAM double port
Data can be written to either or both ports and can be read from either or both ports. Each
write operation is synchronous, each port has its own address, data in, data out, clock,
clock enable, and write enable. The read and write operations are synchronous and require
a clock edge.
There is no dedicated monitor to arbitrate the effect of identical addresses on both ports. It
is up to the user to time the two clocks appropriately. Conflicting simultaneous writes to
the same location never cause any physical damage but can result in data uncertainty.
X-Ref Target - Figure 1-1
DOPA
DIPA
ADDRA
WEA
ENA
CASCADEOUTB
RSTRAMA
CLKA
RSTREGA
REGCEA
REGCEB
DIPB
ADDRB
WEB
ENB
RSTRAMB
RSTREGB
CLKB
36-Kbit Block RAM
DOPB
DOB
DOA
DIA
DIB
36 Kb
Memory
Array
Port A
32
4
32
4
16
4
32
4
16
4
32
4
Port B
CASCADEOUTA
CASCADEINBCASCADEINA
Introduction aux FPGA
Structure matérielle
Composants matériels
ADCChapter 1: Introduction and Quick Start
The XADC also includes a number of on-chip sensors that support measurement of the
X-Ref Target - Figure 1-1
Figure 1-1: XADC Block Diagram
VP
VREFP
Die
Temperature
VCCINT
VCCAUX
VCCBRAM
VREFN
Mux
M ux
Temperature
Sensor
Supply
Sensors
VN
VAUXP[0]
VAUXN[0]
12-bit,
1 M SPS
ADC A
°C
VAUXP[12]
VAUXN[12]
VAUXP[13]
VAUXN[13]
VAUXP[14]
VAUXN[14]
VAUXP[15]
VAUXN[15]
Control
Registers
Status
Registers
On-Chip Ref
1.25V
JTAG
FPGA
Interconnect
External
Analog Inputs
DRP
12-bit,
1 M SPS
ADC B
UG480_c1_01_090710
32 x 16 bits
Read/W rite
32 x 16 bits
Read Only
Introduction aux FPGA
Structure matérielle
Composants matériels
Processeur ARM sur SmartFusion
Introduction aux FPGA
Structure matérielle
Composants logiciels
Composants logiques
Chaque constructeur définit sa propre cellule de base, qui varie
selon les familles de FPGA.
Les cellules élémentaires :
Portes logiques configurables : fonctions de base (AND, OR...)
Registres : mémoire et synchronisme
Les composants matériels (hardcore) :
Logique complexe : additionneurs, multiplieurs...
Mémoire RAM
Processeurs (ARM, PowerPC...)
Les composants logiciels (softcore) :
UART, USB, contrôleur d’écran...
Processeurs (ARM, RISC...)
FFT, JPEG, SHA-1...
...
Introduction aux FPGA
Structure matérielle
Composants logiciels
Xilinx MicroBlaze (propriétaire)
5.1K LUTs at 241MHz on Xilinx Virtex 6
2.4K LUTs at 131MHz on Xilinx Spartan 6
MicroBlaze Architecture
This chapter contains an overview of MicroBlaze™ features and detailed information on
MicroBlaze architecture including Big-Endian or Little-Endian bit-reversed format, 32-bit general
purpose registers, virtual-memory management, cache software support, and Fast Simplex Link
(FSL) or AXI4-Stream interfaces.
Overview
The MicroBlaze™ embedded processor soft core is a reduced instruction set computer (RISC)
optimized for implementation in Xilinx® Field Programmable Gate Arrays (FPGAs). Figure 2-1
shows a functional block diagram of the MicroBlaze core.
Figure 2-1: MicroBlaze Core Block Diagram
DXCL_M
DXCL_S
Data-sideInstruction-side
IPLB
ILMB
bus interface bus interface
Instruction
Buffer
Program
Counter
Register File
32 X 32b
ALU
Instruction
Decode
Bus
IF
Bus
IF
IXCL_M
IXCL_S
I-Cache
D-Cache
Shift
Barrel Shift
Multiplier
Divider
FPU
Special
Purpose
Registers
Optional MicroBlaze feature
M_AXI_IP
UTLBITLB DTLB
Memory Management Unit (MMU)
DPLB
DLMB
M_AXI_DP
MFSL 0..15
DWFSL 0..15
SFSL 0..15
DRFSL 0..15
or
or
M_AXI_IC M_AXI_DC
Branch
Target
Cache
M0_AXIS..
S0_AXIS..
M15_AXIS
S15_AXIS
Introduction aux FPGA
Structure matérielle
Composants logiciels
Processeur OpenRISC (open-source)
7K core cells, 4 block RAMs at 35MHz on Actel ProASIC3
2.4K LUTs, 1 block RAM at 125MHz on Xilinx Virtex 5
Introduction aux FPGA
Les constructeurs
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Les constructeurs
Les constructeurs
Part de marché en termes de CA en 2010
!"#"$%&'()(*
+#,-./&'0)1*
2/,,"3-&4)5*
6"3.78-9"&:+3,-#;&')1*
<="3>27?"3&0)@*
Technologie
SRAM
Xilinx
Altera
Lattice
Flash
Actel
QuickLogic
Introduction aux FPGA
Les constructeurs
Familles
Xilinx Altera Actel
Hautes performances Virtex Stratix
Rentable Kintex (ex Spartan) Arria Pro Asic 3
Économie d’énergie Artix Cyclone Igloo
Introduction aux FPGA
Les constructeurs
Xilinx Virtex 7
28nm Process
6,8 Milliards de transistors
(intel core i7 : 995 Millions)
Introduction aux FPGA
Les constructeurs
Actel SmartFusion
SmartFusion Customizable System-on-Chip (cSoC)
SmartFusion cSoC Block Diagram
Microcontroller Subsystem
Programmable Analog
FPGA Fabric
SRAM SRAM SRAM SRAM SRAM SRAM
SysReg
ENVM
10/100
EMAC
ESRAM
Timer2
Timer1
APB
I2C 2
UART 2
SPI 2
DAC
(SDD)
DAC
(SDD)
PPB
........
........
............
VersaTiles
3V
I2C 1
UART 1
SPI 1
IAP PDMA APB EMC
AHB Bus Matrix
EFROM
APB
Sample Sequencing
Engine
Post Processing
Engine
ADC
Analog Compute
Engine
PLL
Supervisor
WDT
OSC
32 KHz
RC
+
–
RTC
JTAG
Cortex™
-M3
SWD
NVIC SysTick
MPU
S D I
Volt Mon.
(ABPS)
Temp.
Mon.
SCB
Curr.
Mon.
Comparator
ADC
Volt Mon.
(ABPS)
Temp.
Mon.
SCB
Curr.
Mon.
Comparator
3V
............
....
Introduction aux FPGA
Programmation
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Programmation
Flot de conception
Flot de conception (1)
Design process (1)
Design and implement a simple unit permitting to
speed up encryption with RC5-similar cipher with
fixed key set on 8031 microcontroller. Unlike in
the experiment 5, this time your unit has to be able
to perform an encryption algorithm by itself,
executing 32 rounds…..
Library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity RC5_core is
port(
clock, reset, encr_decr: in std_logic;
data_input: in std_logic_vector(31 downto 0);
data_output: out std_logic_vector(31 downto 0);
out_full: in std_logic;
key_input: in std_logic_vector(31 downto 0);
key_read: out std_logic;
);
end AES_core;
Specification (Lab Experiments)
VHDL description (Your Source Files)
Functional simulation
Post-synthesis simulation
Synthesis
Introduction aux FPGA
Programmation
Flot de conception
Flot de conception (2)
Design process (2)
Implementation
Configuration
Timing simulation
On chip testing
Introduction aux FPGA
Programmation
Flot de conception
Environnement de développement
Synthèse
Actel Libero
Altera Quartus II
Synopsys Synplify
Xilinx ISE
...
Simulation
ModelSim
...
Introduction aux FPGA
Programmation
Synthèse
TraductionTranslation
Translation
UCF
NGD
EDIF NCF
Native Generic Database file
Constraint Editor
User Constraint File
Native
Constraint
File
Electronic Design
Interchange Format
Circuit netlist Timing Constraints
Synthesis
Introduction aux FPGA
Programmation
Synthèse
Pin assignment file (UCF)
NET "clock" LOC = "P8" ;
NET "control<0>" LOC = "K4" ;
NET "control<1>" LOC = "K3" ;
NET "control<2>" LOC = "K2" ;
NET "reset" LOC = "E11" ;
NET "segments<0>" LOC = "R10" ;
NET "segments<1>" LOC = "P10" ;
NET "segments<2>" LOC = "M11" ;
NET "segments<3>" LOC = "M6" ;
NET "segments<4>" LOC = "N6" ;
NET "segments<5>" LOC = "T7" ;
NET "segments<6>" LOC = "R7" ;
Introduction aux FPGA
Programmation
Synthèse
Pin assignment graphique
Assigning I/O Locations Using PlanAhead Software
3. Click Close on the Welcome dialog to proceed in the PlanAhead software.
X-Ref Target - Figure 6-12
Figure 6-12: PlanAhead Software for I/O Planning
Introduction aux FPGA
Programmation
Synthèse
Synthèse Netlist
46ECE 449 – Computer Design Lab
architecture MLU_DATAFLOW of MLU is
signal A1:STD_LOGIC;
signal B1:STD_LOGIC;
signal Y1:STD_LOGIC;
signal MUX_0, MUX_1, MUX_2, MUX_3: STD_LOGIC;
begin
A1<=A when (NEG_A='0') else
not A;
B1<=B when (NEG_B='0') else
not B;
Y<=Y1 when (NEG_Y='0') else
not Y1;
MUX_0<=A1 and B1;
MUX_1<=A1 or B1;
MUX_2<=A1 xor B1;
MUX_3<=A1 xnor B1;
with (L1 & L0) select
Y1<=MUX_0 when "00",
MUX_1 when "01",
MUX_2 when "10",
MUX_3 when others;
end MLU_DATAFLOW;
VHDL description Circuit netlist
Logic Synthesis
Introduction aux FPGA
Programmation
Placement / Routage
Mapping
55ECE 449 – Computer Design Lab
Mapping
LUT2
LUT3
LUT4
LUT5
LUT1
FF1
FF2
LUT0
Introduction aux FPGA
Programmation
Placement / Routage
Placement/Routage
Programmable Connections
FPGA
Introduction aux FPGA
Programmation
Tests
Analyse des temps de propagation
Recherche du chemin critique (chemin le plus long)
Détermine la fréquence maximale de fonctionnement
Simulation post-routage basé sur ces données
59ECE 449 – Computer Design Lab
Static Timing Analysis
•! Critical Path – The Longest Path From
Outputs of Registers to Inputs of
Registers
D Q
in
clk
D Q
out
tP logic
tCritical = tP FF + tP logic + tS FF
Introduction aux FPGA
Programmation
Tests
Simulation : ModelSim
Chapter 5: Behavioral Simulation
5. Drag all the selected signals to the waveform.
Note: Alternatively, right-click on a selected signal and select Add to Wave Window.
Notice that the waveforms have not been drawn for the newly added signals. This is
because ISim did not record the data for these signals. By default, ISim records data only
for the signals that are added to the waveform window while the simulation is running.
Therefore, when new signals are added to the waveform window, you must rerun the
simulation for the desired amount of time.
Rerunning Simulation
X-Ref Target - Figure 5-13
Figure 5-13: Adding Signals to the Simulation Waveform
Automatisation des tests
C txt
VHDL Ctxt
Génération Vecteurs Testbench Résultats Analyse
Introduction aux FPGA
Programmation
Tests
Programmation
When the Program operation completes, a large blue message appears showing that
programming was successful, as shown in the following figure. This message
disappears after a few seconds.
Figure 8-8: Operation Status
X-Ref Target - Figure 8-9
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Arithmétique sur FPGA
Projet Arenaire
Équipe INRIA / Laboratoire LIP / ENS
Développement de l’arithmétique sur ordinateur
FloPoCo (Floating Point Cores)
Génération d’opérateurs de calculs pour FPGA
Opérateurs classiques (+,−,×,/ et
√
x)
Opérateurs exotiques (multiplication par une constante...)
Virgule fixe, flottant, formats exotiques...
Cryptographie
Laboratoire CITI / INSA
Développement/expérimentations de nouvelles architectures
pour la cryptographie
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Radio Logicielle
Plateforme matérielle
Équipe Airelle / Laboratoire CITI / INSA
Développement de composants radio en logiciel
Plateforme d’expérimentation
Lyrtech Small Form Factor
Digital processing module
Data conversion module
TransceiverAntenna IF DM SoC
DM6446
FPGA
Virtex-4
LYRIO
LYRIO
Virtex-4
FPGA
ADC
ADC
RX
RX
TX
TX
Clk Ref
GPIO
RF module
a complete array
for any type of
ring for each
h the host device
gration from
-
to
F
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Exemple : Cryptographie sur FPGA (GPS)
Les réseaux de capteurs sans fil PowWow
Actel Igloo AGL250
TI MSP430
TI CC2420
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Architecture classique20 Introduction
Sensor MCU
Power Supply
Tx
Rx
Sensor
Subsystem
Computation
Subsystem
Power Subsystem
Communication
Subsystem
Figure 1.1: General architecture of a WSN node.
versality. However, when looking more carefully to actual design practices, we observe
that the need for flexibility/programmability is essentially geared toward the user ap-
plication layer, which happens to represent only a small fraction of a WSN node’s
processing workload. Whereas most of the processing workload is almost dedicated
to the communication protocol stack. Hence, in our opinion, it is worth-studying to
explore the hardware specialization approach in WSN node design as well to meet the
ultra low-power requirement. In order to reduce the power consumption in a WSN
node, we first need to look at the generic node architecture to find out the hotspots for
power consumption. The generic architecture of a WSN node is discussed in the next
section.
,version1-6Jan2011
Architecture PowWow
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Actel Igloo AGL250
* Not supported by AGL015 and AGL030 devices
Figure 1-1 • IGLOO Device Architecture Overview with Two I/O Banks (AGL015, AGL030, AGL060, and
AGL125)
Figure 1-2 • IGLOO Device Architecture Overview with Four I/O Banks (AGL250, AGL600, AGL400, and
AGL1000)
ISP AES
Decryption*
User Nonvolatile
FlashRom
Flash*Freeze
Technology
Charge
Pumps
Ba
nk0
Bank 1
ISP AES
Decryption*
User Nonvolatile
FlashRom
Flash*Freeze
Technology
Charge
Pumps
RAM Block
4,608-Bit Dual-Port
SRAM or FIFO Block
(AGL600 and AGL1000)
RAM Block
4,608-Bit Dual-Port
SRAM or FIFO Block
VersaTile
CCC
I/Os
Bank 0
Bank3Bank3
Bank1Bank1
Bank 2
250 000 portes logiques 6144 VersaTiles
Horloge cadencée à 8 MHz
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Implémentation de GPS
Réaliser une multiplication :
Une clé connue de 128/256/512 bits
une valeur de 32 bits
De manière efficace ?
Multiplication série : méthode shift and add
1 0 0 1 0 1 0
× 1 1 0 1
1 1 0 0 1 0 1 0
1 + 1 0 0 1 0 1 0
0 + 0 0 0 0 0 0 0
1 + 1 0 0 1 0 1 0
1 1 1 1 0 0 0 0 1 0
Multiplication par une constante : méthode KCM
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Multiplication série : McLoone and Robshaw, 2007
+
Control
Logicc
r
s
‘0’
Stores intermediate
multiplication values
Performs left
shift by 1-bit
16
16
15
1
… … ...
… … ... 0
… … ...
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
… … ... 0
011 10 9 8 7 6
11 10 9 8 7 6
011 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
11 10 9 8 7 6
y
Architecture de référence en cryptographie embarquée
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Multiplication par une constante : Architecture KCM
16 × 4 bits rom
4
A0-A3
4 bits adder
A4-A7
A8-A11
44441
Architecture générée par FloPoCo
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Résultats
secret size 128 bits 256 bits 512 bits
Actel Igloo
VersaTiles
parallel impl. 10476 20755 44307
serial impl. 1546 2253 3698
parallel/serial ratio 6.8 9.2 12
Run cycles
parallel impl. 8 12 20
serial impl. 339 603 1131
serial/parallel ratio 42.4 50.3 56.55
AGL250 ($20) : 6144 VersaTiles
AGL1000 ($100) : 24576 VersaTiles
Introduction aux FPGA
Recherche sur les FPGA à Lyon
Résultats
secret size 128 bits 256 bits 512 bits
Xilinx Virtex4
Slices
parallel impl. 2213 4358 7115
serial impl. 493 784 1377
parallel/serial ratio 4.5 5.5 5.2
Run cycles
parallel impl. 8 12 20
serial impl. 339 603 1131
serial/parallel ratio 42.4 50.3 56.55
XC4VSX35 ($600) : 15360 Slices
source prix : Digi-Key, 11/2011
Introduction aux FPGA
Sources
Sommaire
Introduction
Rappels sur les circuits intégrés
Structure matérielle
Structure générale
Cellules élémentaires
Composants matériels
Composants logiciels
Les constructeurs
Programmation
Flot de conception
Synthèse
Placement / Routage
Tests
Recherche sur les FPGA à Lyon
Sources
Introduction aux FPGA
Sources
Sources
Introduction aux circuits FPGA, Arnaud Tisserand
Introduction to FPGA Devices, Boards and tools (Slides from
George Manson University)
http://www.fpgadeveloper.com/2011/07/
list-and-comparison-of-fpga-companies.html
http://www.actel.com
http://www.xilinx.com
http://www.altera.com
http://www.lyrtech.com
http://www.digikey.com
http://powwow.gforge.inria.fr
http://opencores.org
1 sur 58

Recommandé

Composants reconfigurables par
Composants reconfigurablesComposants reconfigurables
Composants reconfigurablesPeronnin Eric
1.8K vues28 diapositives
Architecture et programmation des circuits CPLD et des FPGA par
Architecture et programmation des circuits CPLD et des FPGAArchitecture et programmation des circuits CPLD et des FPGA
Architecture et programmation des circuits CPLD et des FPGAChiheb Ouaghlani
2.4K vues21 diapositives
Processeur FPGA par
Processeur FPGAProcesseur FPGA
Processeur FPGAHassan KIBOU
1.9K vues27 diapositives
Généralités sur les périphériques du STM32 par
Généralités sur les périphériques du STM32Généralités sur les périphériques du STM32
Généralités sur les périphériques du STM32Hajer Dahech
3.9K vues24 diapositives
SoC Hamdi -chap4 par
SoC Hamdi -chap4SoC Hamdi -chap4
SoC Hamdi -chap4mustapha hamdi
1.2K vues64 diapositives
Formation Bus de Terrain _Partie 3_1 _Modbus tcp par
Formation Bus de Terrain _Partie 3_1 _Modbus tcpFormation Bus de Terrain _Partie 3_1 _Modbus tcp
Formation Bus de Terrain _Partie 3_1 _Modbus tcpWojciech GOMOLKA
5K vues39 diapositives

Contenu connexe

Tendances

Presentation fpga par
Presentation fpgaPresentation fpga
Presentation fpgaImad Bourja
830 vues84 diapositives
Formation Bus de Terrain _Partie 3_2 _ProfiNet par
Formation Bus de Terrain _Partie 3_2 _ProfiNetFormation Bus de Terrain _Partie 3_2 _ProfiNet
Formation Bus de Terrain _Partie 3_2 _ProfiNetWojciech GOMOLKA
1.8K vues13 diapositives
T ps dsp par
T ps dspT ps dsp
T ps dspHoussemOuni1
256 vues52 diapositives
Formation Bus de Terrain _Partie 3_ Ethernet Industriel pour Valve Terminals par
Formation Bus de Terrain  _Partie 3_  Ethernet Industriel pour Valve TerminalsFormation Bus de Terrain  _Partie 3_  Ethernet Industriel pour Valve Terminals
Formation Bus de Terrain _Partie 3_ Ethernet Industriel pour Valve TerminalsWojciech GOMOLKA
3.6K vues62 diapositives
Vhdl bousmah f par
Vhdl bousmah fVhdl bousmah f
Vhdl bousmah fSabrine Chahbi
1.9K vues121 diapositives
VHDL/FPGA par
VHDL/FPGA VHDL/FPGA
VHDL/FPGA 04amine
1.6K vues16 diapositives

Tendances(20)

Formation Bus de Terrain _Partie 3_2 _ProfiNet par Wojciech GOMOLKA
Formation Bus de Terrain _Partie 3_2 _ProfiNetFormation Bus de Terrain _Partie 3_2 _ProfiNet
Formation Bus de Terrain _Partie 3_2 _ProfiNet
Wojciech GOMOLKA1.8K vues
Formation Bus de Terrain _Partie 3_ Ethernet Industriel pour Valve Terminals par Wojciech GOMOLKA
Formation Bus de Terrain  _Partie 3_  Ethernet Industriel pour Valve TerminalsFormation Bus de Terrain  _Partie 3_  Ethernet Industriel pour Valve Terminals
Formation Bus de Terrain _Partie 3_ Ethernet Industriel pour Valve Terminals
Wojciech GOMOLKA3.6K vues
VHDL/FPGA par 04amine
VHDL/FPGA VHDL/FPGA
VHDL/FPGA
04amine1.6K vues
Formation Bus de Terrain _Partie 3_3 _EthernetIP par Wojciech GOMOLKA
Formation Bus de Terrain _Partie 3_3 _EthernetIPFormation Bus de Terrain _Partie 3_3 _EthernetIP
Formation Bus de Terrain _Partie 3_3 _EthernetIP
FF paramétrage adressage conception par Fieldbus France
FF paramétrage adressage conceptionFF paramétrage adressage conception
FF paramétrage adressage conception
Fieldbus France1.4K vues
Formation Bus de Terrain _Partie 2a _ IO-Link par Wojciech GOMOLKA
Formation Bus de Terrain _Partie 2a _ IO-LinkFormation Bus de Terrain _Partie 2a _ IO-Link
Formation Bus de Terrain _Partie 2a _ IO-Link
Wojciech GOMOLKA2.1K vues
Formation Bus de Terrain _Partie 3_5 _SERCOS III par Wojciech GOMOLKA
Formation Bus de Terrain _Partie 3_5 _SERCOS IIIFormation Bus de Terrain _Partie 3_5 _SERCOS III
Formation Bus de Terrain _Partie 3_5 _SERCOS III
Wojciech GOMOLKA851 vues
Altera nios ii embedded evaluation kit par Wassim Smati
Altera nios ii embedded evaluation kitAltera nios ii embedded evaluation kit
Altera nios ii embedded evaluation kit
Wassim Smati1.9K vues
Pic 16f877 .. par sunprass
Pic 16f877 ..Pic 16f877 ..
Pic 16f877 ..
sunprass9.3K vues
Cours asm (1) par sunprass
Cours asm (1)Cours asm (1)
Cours asm (1)
sunprass816 vues
Formation Bus de Terrain FR _Partie 1_ General par Wojciech GOMOLKA
Formation Bus de Terrain FR _Partie 1_ GeneralFormation Bus de Terrain FR _Partie 1_ General
Formation Bus de Terrain FR _Partie 1_ General
Wojciech GOMOLKA2.7K vues

Similaire à Fpga handout

API et Supervision industrielle par
API et Supervision industrielle API et Supervision industrielle
API et Supervision industrielle sarah Benmerzouk
135 vues26 diapositives
Diapo zig bee_amin_jan11_final par
Diapo zig bee_amin_jan11_finalDiapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalAmin Ferjani
1.9K vues64 diapositives
chap2-3-pla-pal-gal.pptx par
chap2-3-pla-pal-gal.pptxchap2-3-pla-pal-gal.pptx
chap2-3-pla-pal-gal.pptxwafawafa52
64 vues17 diapositives
Disque dur par
Disque durDisque dur
Disque dursam00101
1.3K vues23 diapositives
Sdh1552010 par
Sdh1552010Sdh1552010
Sdh1552010Salvator Fayssal
134 vues123 diapositives
we config - procédure configuration rapide réseau Ethernet par
we config - procédure configuration rapide réseau Ethernetwe config - procédure configuration rapide réseau Ethernet
we config - procédure configuration rapide réseau EthernetOlivier Bughin
436 vues36 diapositives

Similaire à Fpga handout(20)

Diapo zig bee_amin_jan11_final par Amin Ferjani
Diapo zig bee_amin_jan11_finalDiapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_final
Amin Ferjani1.9K vues
chap2-3-pla-pal-gal.pptx par wafawafa52
chap2-3-pla-pal-gal.pptxchap2-3-pla-pal-gal.pptx
chap2-3-pla-pal-gal.pptx
wafawafa5264 vues
Disque dur par sam00101
Disque durDisque dur
Disque dur
sam001011.3K vues
we config - procédure configuration rapide réseau Ethernet par Olivier Bughin
we config - procédure configuration rapide réseau Ethernetwe config - procédure configuration rapide réseau Ethernet
we config - procédure configuration rapide réseau Ethernet
Olivier Bughin436 vues
Micocontroleur16 fxxx (1) par Karim Touati
Micocontroleur16 fxxx (1)Micocontroleur16 fxxx (1)
Micocontroleur16 fxxx (1)
Karim Touati1.9K vues
Cours Benhabiles TMS320.pdf par HouBou3
Cours Benhabiles TMS320.pdfCours Benhabiles TMS320.pdf
Cours Benhabiles TMS320.pdf
HouBou3143 vues
EIGRP - EIGRP sur frame relay par mdyabi
EIGRP - EIGRP sur frame relayEIGRP - EIGRP sur frame relay
EIGRP - EIGRP sur frame relay
mdyabi1.2K vues
étapes de réalisation réseau local par FAN COMPUTING
étapes de réalisation réseau localétapes de réalisation réseau local
étapes de réalisation réseau local
FAN COMPUTING2.6K vues
Architecture des ordinateurs par RMwebsite
Architecture des ordinateursArchitecture des ordinateurs
Architecture des ordinateurs
RMwebsite5.2K vues
Présentation 13 sept 2011 ff association france par Fieldbus France
Présentation 13 sept 2011 ff association francePrésentation 13 sept 2011 ff association france
Présentation 13 sept 2011 ff association france
Fieldbus France2.1K vues
Présentation Arduino par Christian, F5HOD par webmasterref68
Présentation Arduino par Christian, F5HODPrésentation Arduino par Christian, F5HOD
Présentation Arduino par Christian, F5HOD
webmasterref6818.5K vues

Fpga handout

  • 1. Introduction aux FPGA Introduction aux FPGA Mickaël Dardaillon M2RTS 16/11/2011
  • 2. Introduction aux FPGA Introduction Hiérarchie Circuits Logiques ASICCircuits programmables FPGACPLD Processeurs DSPmicro-contrôleursCPU Définitions CPU : Computer Processing Unit DSP : Digital Signal Processor CPLD : Complex Programmable Logic Device FPGA : Field Programmable Gate Array ASIC : Application Specific Integrated Circuit
  • 3. Introduction aux FPGA Introduction ASIC Développement long Coût de fabrication (en augmentation) Full custom : Performances maximales Fabrication grande série FPGA Développement rapide Coût à l’unité (en diminution) Contraint par la technologie du FPGA Prototypage rapide
  • 4. Introduction aux FPGA Introduction Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 5. Introduction aux FPGA Rappels sur les circuits intégrés Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 6. Introduction aux FPGA Rappels sur les circuits intégrés Le transistor MOS MOS : Metal Oxide Semiconductor Composant électronique de base Porte logique ON/OFF Canal Drain Grille SourceMétal Oxyde Semi−conducteur
  • 7. Introduction aux FPGA Rappels sur les circuits intégrés Technologie CMOS CMOS : Complementary MOS Niveaux logiques 0 = 0V 1 = 3V Deux types de MOS nMOS : conducteur si la grille=1 pMOS : conducteur si la grille=0 Puissance dissipée P ∝ CV 2 f C : Capacité d’un MOS V : Tension sur la grille f : Fréquence de fonctionnement Types de MOS nMOS source grille g=1 drain pMOS source grille g=0 drain Exemples 1 xx 0 Inverseur porte NAND 1 y (xy) x x y 0
  • 8. Introduction aux FPGA Rappels sur les circuits intégrés Portes élémentaires Amplificateur : x F F = x x F 0 0 1 1 ET : F x y F = x y x y F 0 0 0 0 1 0 1 0 0 1 1 1 Inverseur : x F F = x x F 0 1 1 0 NON ET : y x F F = x y x y F 0 0 1 0 1 1 1 0 1 1 1 0
  • 9. Introduction aux FPGA Rappels sur les circuits intégrés Conception de circuit combinatoire 1. Description du problème : Addition entre deux bits a et b et une retenue c 2. Table de vérité : entrées sorties a b c S cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 3. Équations logiques : S = abc + abc + abc + abc cout = abc + abc + abc + abc 4. Équations simplifiées : S = (a ⊕ b) ⊕ c cout = ab + (a ⊕ b)c 5. Portes logiques : A B C S Cout
  • 10. Introduction aux FPGA Rappels sur les circuits intégrés Logique séquentielle Bascule RS Q Bascule RS S R Q S R Q Q 0 1 0 1 1 1 interdit interdit 1 0 1 0 0 0 Qn−1 Qn−1 Bascule D : mémorise D lorsque l’horloge passe à ’1’ Valeur 0011 01 00 00 11 11 00001111 Horloge Donnée Valeur
  • 11. Introduction aux FPGA Structure matérielle Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 12. Introduction aux FPGA Structure matérielle Structure générale Ressources globales logique programmable routage programmable générateur d’horloge programmable entrée/sortie programmable mémoire RAM (sur certains circuits) + mémoire de configuration bloc de configuration
  • 13. Introduction aux FPGA Structure matérielle Structure générale Routage des signaux matrice de routage bloc logique canaux généraux connection longue distance point de routage connection directe
  • 14. Introduction aux FPGA Structure matérielle Structure générale Génération d’horloge Les horloges sont distribuées dans l’ensemble du FPGA par des circuits de routage spécifique, aucun travail de la part du concepteur ! DCM BUF CLK CLKFB CTRL CLK0 CLK90 CLK180 CLK270 CLKx2 CLK180x2 CLKDIV STATUS DCM signal interne vers distribution par zone plots d’horloge
  • 15. Introduction aux FPGA Structure matérielle Structure générale Entrées / Sorties Il existe plusieurs niveaux de tensions d’entrée / sortie, qui sont à prendre en compte pour : La conception de la carte (compatibilité entre composants) Les contraintes de routage (technologie à utiliser sur I/O) TTL CMOS TTL/CMOS CMOS 3V 0.8 V 0.4 V 2.7 V 0.5 V 3.5 V 1.0 V 4.5 V 3.9 V 0.8 V 0.4 V 0.8 V 0.4 V 2.4 V 3.3 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 0.0 V 2.0 V2.0 V2.0 V 5.0 V 5.0 V 5.0 V 5.0 V 5.0 V 5.0 V 3.3 V 5 V 4 V 3 V 2 V 1 V 0 V 0 1 1 0 x porte inV Vout 1 1 0 0 x 0 x 0 0 x 0 1 1 1 1
  • 16. Introduction aux FPGA Structure matérielle Cellules élémentaires Composants logiques Chaque constructeur définit sa propre cellule de base, qui varie selon les familles de FPGA. Les cellules élémentaires : Portes logiques configurables : fonctions de base (AND, OR...) Registres : mémoire et synchronisme Les composants matériels (hardcore) : Logique complexe : additionneurs, multiplieurs... Mémoire RAM Processeurs (ARM, PowerPC...) Les composants logiciels (softcore) : UART, USB, contrôleur d’écran... Processeurs (ARM, RISC...) FFT, JPEG, SHA-1... ...
  • 17. Introduction aux FPGA Structure matérielle Cellules élémentaires Xilinx Virtex 4 : Slice !"#$%&'#()*+%,-!'./$01%/23"#+03+*20%.03/40%3/(%.0%35($#10201%36/$$#37 !()*+,-+.+/(012(3('4+4(5)$50+"3+5+6(2(78+9($:'8;<+!=>.+/2(?' !"#$%&'( )*+ ,-. !"#$%&'( )*+ ,/. 0*1/1 0*1/2 34#'567'#8( 9$:(8944;( <=>#8 ? @)A ? @)A B B @C @C DE DE F0*1 10*1
  • 18. Introduction aux FPGA Structure matérielle Cellules élémentaires Altera Stratix 5 : ALM (Adaptative Logic Module) In addition to the adaptive LUT-based resources, each ALM contains four programmable registers, two dedicated full adders, a carry chain, a shared arithmetic chain, and a register chain. Through these dedicated resources, an ALM can efficiently implement various arithmetic functions and shift registers. Each ALM drives all types of interconnects: local, row, column, carry chain, shared arithmetic chain, register chain, and direct link. Figure 1–5 shows a high-level block diagram of the Stratix V ALM. Figure 1–5. High-Level Block Diagram of the Stratix V ALM datac datad datae1 dataf1 adder1 datae0 dataf0 dataa datab carry_in carry_out Combinational/Memory ALUT0 6-Input LUT 6-Input LUT shared_arith_out shared_arith_in Combinational/Memory ALUT1 adder0 reg_chain_in D Q reg0 labclk To general or local routing To general or local routing D Q reg1 To general or local routing To general or local routing D Q reg2 D Q reg3 To general or local routing To general or local routing To general or local routing To general or local routing reg_chain_out
  • 19. Introduction aux FPGA Structure matérielle Cellules élémentaires Actel Pro Asic 3 : VersaTile ProASIC3 Flash Family FPGAs Refer to Figure 1-3 for VersaTile configurations. User Nonvolatile FlashROM ProASIC3 devices have 1 kbit of on-chip, user-accessible, nonvolatile FlashROM. The FlashROM can be used in diverse system applications: • Internet protocol addressing (wireless or fixed) • System calibration settings • Device serialization and/or inventory control • Subscription-based business models (for example, set-top boxes) • Secure key storage for secure communications algorithms Figure 1-3 • VersaTile Configurations X1 YX2 X3 LUT-3 Data Y CLK Enable CLR D-FF Data Y CLK CLR D-FF LUT-3 Equivalent D-Flip-Flop with Clear or Set Enable D-Flip-Flop with Clear or Set
  • 20. Introduction aux FPGA Structure matérielle Composants matériels Composants logiques Chaque constructeur définit sa propre cellule de base, qui varie selon les familles de FPGA. Les cellules élémentaires : Portes logiques configurables : fonctions de base (AND, OR...) Registres : mémoire et synchronisme Les composants matériels (hardcore) : Logique complexe : additionneurs, multiplieurs... Mémoire RAM Processeurs (ARM, PowerPC...) Les composants logiciels (softcore) : UART, USB, contrôleur d’écran... Processeurs (ARM, RISC...) FFT, JPEG, SHA-1... ...
  • 21. Introduction aux FPGA Structure matérielle Composants matériels DSP Slice pour Virtex 4 Entrées 18 bits avec multiplication / accumulation sur 32 échantillons FPGAs are efficient for digital signal processing (DSP) applications because they can implement custom, fully parallel algorithms. DSP applications use many binary multipliers and accumulators that are best implemented in dedicated DSP slices. All 7 series FPGAs have many dedicated, full-custom, low-power DSP slices, combining high speed with small size while retaining system design flexibility. The DSP slices enhance the speed and efficiency of many applications beyond digital signal processing, such as wide dynamic bus shifters, memory address generators, wide bus multiplexers, and memory-mapped I/O registers. The basic functionality of the DSP48E1 slice is shown in Figure 1-1. For complete details, refer to Figure 2-1 and Chapter 2, DSP48E1 Description and Specifics. X-Ref Target - Figure 1-1 Figure 1-1: Basic DSP48E1 Slice Functionality UG479_c1_21_032111 48-Bit Accumulator/Logic Unit Pattern Detector 25 x 18 Multiplier Pre-adder B A D C P + / – X = + –
  • 22. Introduction aux FPGA Structure matérielle Composants matériels RAM double port Data can be written to either or both ports and can be read from either or both ports. Each write operation is synchronous, each port has its own address, data in, data out, clock, clock enable, and write enable. The read and write operations are synchronous and require a clock edge. There is no dedicated monitor to arbitrate the effect of identical addresses on both ports. It is up to the user to time the two clocks appropriately. Conflicting simultaneous writes to the same location never cause any physical damage but can result in data uncertainty. X-Ref Target - Figure 1-1 DOPA DIPA ADDRA WEA ENA CASCADEOUTB RSTRAMA CLKA RSTREGA REGCEA REGCEB DIPB ADDRB WEB ENB RSTRAMB RSTREGB CLKB 36-Kbit Block RAM DOPB DOB DOA DIA DIB 36 Kb Memory Array Port A 32 4 32 4 16 4 32 4 16 4 32 4 Port B CASCADEOUTA CASCADEINBCASCADEINA
  • 23. Introduction aux FPGA Structure matérielle Composants matériels ADCChapter 1: Introduction and Quick Start The XADC also includes a number of on-chip sensors that support measurement of the X-Ref Target - Figure 1-1 Figure 1-1: XADC Block Diagram VP VREFP Die Temperature VCCINT VCCAUX VCCBRAM VREFN Mux M ux Temperature Sensor Supply Sensors VN VAUXP[0] VAUXN[0] 12-bit, 1 M SPS ADC A °C VAUXP[12] VAUXN[12] VAUXP[13] VAUXN[13] VAUXP[14] VAUXN[14] VAUXP[15] VAUXN[15] Control Registers Status Registers On-Chip Ref 1.25V JTAG FPGA Interconnect External Analog Inputs DRP 12-bit, 1 M SPS ADC B UG480_c1_01_090710 32 x 16 bits Read/W rite 32 x 16 bits Read Only
  • 24. Introduction aux FPGA Structure matérielle Composants matériels Processeur ARM sur SmartFusion
  • 25. Introduction aux FPGA Structure matérielle Composants logiciels Composants logiques Chaque constructeur définit sa propre cellule de base, qui varie selon les familles de FPGA. Les cellules élémentaires : Portes logiques configurables : fonctions de base (AND, OR...) Registres : mémoire et synchronisme Les composants matériels (hardcore) : Logique complexe : additionneurs, multiplieurs... Mémoire RAM Processeurs (ARM, PowerPC...) Les composants logiciels (softcore) : UART, USB, contrôleur d’écran... Processeurs (ARM, RISC...) FFT, JPEG, SHA-1... ...
  • 26. Introduction aux FPGA Structure matérielle Composants logiciels Xilinx MicroBlaze (propriétaire) 5.1K LUTs at 241MHz on Xilinx Virtex 6 2.4K LUTs at 131MHz on Xilinx Spartan 6 MicroBlaze Architecture This chapter contains an overview of MicroBlaze™ features and detailed information on MicroBlaze architecture including Big-Endian or Little-Endian bit-reversed format, 32-bit general purpose registers, virtual-memory management, cache software support, and Fast Simplex Link (FSL) or AXI4-Stream interfaces. Overview The MicroBlaze™ embedded processor soft core is a reduced instruction set computer (RISC) optimized for implementation in Xilinx® Field Programmable Gate Arrays (FPGAs). Figure 2-1 shows a functional block diagram of the MicroBlaze core. Figure 2-1: MicroBlaze Core Block Diagram DXCL_M DXCL_S Data-sideInstruction-side IPLB ILMB bus interface bus interface Instruction Buffer Program Counter Register File 32 X 32b ALU Instruction Decode Bus IF Bus IF IXCL_M IXCL_S I-Cache D-Cache Shift Barrel Shift Multiplier Divider FPU Special Purpose Registers Optional MicroBlaze feature M_AXI_IP UTLBITLB DTLB Memory Management Unit (MMU) DPLB DLMB M_AXI_DP MFSL 0..15 DWFSL 0..15 SFSL 0..15 DRFSL 0..15 or or M_AXI_IC M_AXI_DC Branch Target Cache M0_AXIS.. S0_AXIS.. M15_AXIS S15_AXIS
  • 27. Introduction aux FPGA Structure matérielle Composants logiciels Processeur OpenRISC (open-source) 7K core cells, 4 block RAMs at 35MHz on Actel ProASIC3 2.4K LUTs, 1 block RAM at 125MHz on Xilinx Virtex 5
  • 28. Introduction aux FPGA Les constructeurs Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 29. Introduction aux FPGA Les constructeurs Les constructeurs Part de marché en termes de CA en 2010 !"#"$%&'()(* +#,-./&'0)1* 2/,,"3-&4)5* 6"3.78-9"&:+3,-#;&')1* <="3>27?"3&0)@* Technologie SRAM Xilinx Altera Lattice Flash Actel QuickLogic
  • 30. Introduction aux FPGA Les constructeurs Familles Xilinx Altera Actel Hautes performances Virtex Stratix Rentable Kintex (ex Spartan) Arria Pro Asic 3 Économie d’énergie Artix Cyclone Igloo
  • 31. Introduction aux FPGA Les constructeurs Xilinx Virtex 7 28nm Process 6,8 Milliards de transistors (intel core i7 : 995 Millions)
  • 32. Introduction aux FPGA Les constructeurs Actel SmartFusion SmartFusion Customizable System-on-Chip (cSoC) SmartFusion cSoC Block Diagram Microcontroller Subsystem Programmable Analog FPGA Fabric SRAM SRAM SRAM SRAM SRAM SRAM SysReg ENVM 10/100 EMAC ESRAM Timer2 Timer1 APB I2C 2 UART 2 SPI 2 DAC (SDD) DAC (SDD) PPB ........ ........ ............ VersaTiles 3V I2C 1 UART 1 SPI 1 IAP PDMA APB EMC AHB Bus Matrix EFROM APB Sample Sequencing Engine Post Processing Engine ADC Analog Compute Engine PLL Supervisor WDT OSC 32 KHz RC + – RTC JTAG Cortex™ -M3 SWD NVIC SysTick MPU S D I Volt Mon. (ABPS) Temp. Mon. SCB Curr. Mon. Comparator ADC Volt Mon. (ABPS) Temp. Mon. SCB Curr. Mon. Comparator 3V ............ ....
  • 33. Introduction aux FPGA Programmation Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 34. Introduction aux FPGA Programmation Flot de conception Flot de conception (1) Design process (1) Design and implement a simple unit permitting to speed up encryption with RC5-similar cipher with fixed key set on 8031 microcontroller. Unlike in the experiment 5, this time your unit has to be able to perform an encryption algorithm by itself, executing 32 rounds….. Library IEEE; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity RC5_core is port( clock, reset, encr_decr: in std_logic; data_input: in std_logic_vector(31 downto 0); data_output: out std_logic_vector(31 downto 0); out_full: in std_logic; key_input: in std_logic_vector(31 downto 0); key_read: out std_logic; ); end AES_core; Specification (Lab Experiments) VHDL description (Your Source Files) Functional simulation Post-synthesis simulation Synthesis
  • 35. Introduction aux FPGA Programmation Flot de conception Flot de conception (2) Design process (2) Implementation Configuration Timing simulation On chip testing
  • 36. Introduction aux FPGA Programmation Flot de conception Environnement de développement Synthèse Actel Libero Altera Quartus II Synopsys Synplify Xilinx ISE ... Simulation ModelSim ...
  • 37. Introduction aux FPGA Programmation Synthèse TraductionTranslation Translation UCF NGD EDIF NCF Native Generic Database file Constraint Editor User Constraint File Native Constraint File Electronic Design Interchange Format Circuit netlist Timing Constraints Synthesis
  • 38. Introduction aux FPGA Programmation Synthèse Pin assignment file (UCF) NET "clock" LOC = "P8" ; NET "control<0>" LOC = "K4" ; NET "control<1>" LOC = "K3" ; NET "control<2>" LOC = "K2" ; NET "reset" LOC = "E11" ; NET "segments<0>" LOC = "R10" ; NET "segments<1>" LOC = "P10" ; NET "segments<2>" LOC = "M11" ; NET "segments<3>" LOC = "M6" ; NET "segments<4>" LOC = "N6" ; NET "segments<5>" LOC = "T7" ; NET "segments<6>" LOC = "R7" ;
  • 39. Introduction aux FPGA Programmation Synthèse Pin assignment graphique Assigning I/O Locations Using PlanAhead Software 3. Click Close on the Welcome dialog to proceed in the PlanAhead software. X-Ref Target - Figure 6-12 Figure 6-12: PlanAhead Software for I/O Planning
  • 40. Introduction aux FPGA Programmation Synthèse Synthèse Netlist 46ECE 449 – Computer Design Lab architecture MLU_DATAFLOW of MLU is signal A1:STD_LOGIC; signal B1:STD_LOGIC; signal Y1:STD_LOGIC; signal MUX_0, MUX_1, MUX_2, MUX_3: STD_LOGIC; begin A1<=A when (NEG_A='0') else not A; B1<=B when (NEG_B='0') else not B; Y<=Y1 when (NEG_Y='0') else not Y1; MUX_0<=A1 and B1; MUX_1<=A1 or B1; MUX_2<=A1 xor B1; MUX_3<=A1 xnor B1; with (L1 & L0) select Y1<=MUX_0 when "00", MUX_1 when "01", MUX_2 when "10", MUX_3 when others; end MLU_DATAFLOW; VHDL description Circuit netlist Logic Synthesis
  • 41. Introduction aux FPGA Programmation Placement / Routage Mapping 55ECE 449 – Computer Design Lab Mapping LUT2 LUT3 LUT4 LUT5 LUT1 FF1 FF2 LUT0
  • 42. Introduction aux FPGA Programmation Placement / Routage Placement/Routage Programmable Connections FPGA
  • 43. Introduction aux FPGA Programmation Tests Analyse des temps de propagation Recherche du chemin critique (chemin le plus long) Détermine la fréquence maximale de fonctionnement Simulation post-routage basé sur ces données 59ECE 449 – Computer Design Lab Static Timing Analysis •! Critical Path – The Longest Path From Outputs of Registers to Inputs of Registers D Q in clk D Q out tP logic tCritical = tP FF + tP logic + tS FF
  • 44. Introduction aux FPGA Programmation Tests Simulation : ModelSim Chapter 5: Behavioral Simulation 5. Drag all the selected signals to the waveform. Note: Alternatively, right-click on a selected signal and select Add to Wave Window. Notice that the waveforms have not been drawn for the newly added signals. This is because ISim did not record the data for these signals. By default, ISim records data only for the signals that are added to the waveform window while the simulation is running. Therefore, when new signals are added to the waveform window, you must rerun the simulation for the desired amount of time. Rerunning Simulation X-Ref Target - Figure 5-13 Figure 5-13: Adding Signals to the Simulation Waveform Automatisation des tests C txt VHDL Ctxt Génération Vecteurs Testbench Résultats Analyse
  • 45. Introduction aux FPGA Programmation Tests Programmation When the Program operation completes, a large blue message appears showing that programming was successful, as shown in the following figure. This message disappears after a few seconds. Figure 8-8: Operation Status X-Ref Target - Figure 8-9
  • 46. Introduction aux FPGA Recherche sur les FPGA à Lyon Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 47. Introduction aux FPGA Recherche sur les FPGA à Lyon Arithmétique sur FPGA Projet Arenaire Équipe INRIA / Laboratoire LIP / ENS Développement de l’arithmétique sur ordinateur FloPoCo (Floating Point Cores) Génération d’opérateurs de calculs pour FPGA Opérateurs classiques (+,−,×,/ et √ x) Opérateurs exotiques (multiplication par une constante...) Virgule fixe, flottant, formats exotiques... Cryptographie Laboratoire CITI / INSA Développement/expérimentations de nouvelles architectures pour la cryptographie
  • 48. Introduction aux FPGA Recherche sur les FPGA à Lyon Radio Logicielle Plateforme matérielle Équipe Airelle / Laboratoire CITI / INSA Développement de composants radio en logiciel Plateforme d’expérimentation Lyrtech Small Form Factor Digital processing module Data conversion module TransceiverAntenna IF DM SoC DM6446 FPGA Virtex-4 LYRIO LYRIO Virtex-4 FPGA ADC ADC RX RX TX TX Clk Ref GPIO RF module a complete array for any type of ring for each h the host device gration from - to F
  • 49. Introduction aux FPGA Recherche sur les FPGA à Lyon Exemple : Cryptographie sur FPGA (GPS) Les réseaux de capteurs sans fil PowWow Actel Igloo AGL250 TI MSP430 TI CC2420
  • 50. Introduction aux FPGA Recherche sur les FPGA à Lyon Architecture classique20 Introduction Sensor MCU Power Supply Tx Rx Sensor Subsystem Computation Subsystem Power Subsystem Communication Subsystem Figure 1.1: General architecture of a WSN node. versality. However, when looking more carefully to actual design practices, we observe that the need for flexibility/programmability is essentially geared toward the user ap- plication layer, which happens to represent only a small fraction of a WSN node’s processing workload. Whereas most of the processing workload is almost dedicated to the communication protocol stack. Hence, in our opinion, it is worth-studying to explore the hardware specialization approach in WSN node design as well to meet the ultra low-power requirement. In order to reduce the power consumption in a WSN node, we first need to look at the generic node architecture to find out the hotspots for power consumption. The generic architecture of a WSN node is discussed in the next section. ,version1-6Jan2011 Architecture PowWow
  • 51. Introduction aux FPGA Recherche sur les FPGA à Lyon Actel Igloo AGL250 * Not supported by AGL015 and AGL030 devices Figure 1-1 • IGLOO Device Architecture Overview with Two I/O Banks (AGL015, AGL030, AGL060, and AGL125) Figure 1-2 • IGLOO Device Architecture Overview with Four I/O Banks (AGL250, AGL600, AGL400, and AGL1000) ISP AES Decryption* User Nonvolatile FlashRom Flash*Freeze Technology Charge Pumps Ba nk0 Bank 1 ISP AES Decryption* User Nonvolatile FlashRom Flash*Freeze Technology Charge Pumps RAM Block 4,608-Bit Dual-Port SRAM or FIFO Block (AGL600 and AGL1000) RAM Block 4,608-Bit Dual-Port SRAM or FIFO Block VersaTile CCC I/Os Bank 0 Bank3Bank3 Bank1Bank1 Bank 2 250 000 portes logiques 6144 VersaTiles Horloge cadencée à 8 MHz
  • 52. Introduction aux FPGA Recherche sur les FPGA à Lyon Implémentation de GPS Réaliser une multiplication : Une clé connue de 128/256/512 bits une valeur de 32 bits De manière efficace ? Multiplication série : méthode shift and add 1 0 0 1 0 1 0 × 1 1 0 1 1 1 0 0 1 0 1 0 1 + 1 0 0 1 0 1 0 0 + 0 0 0 0 0 0 0 1 + 1 0 0 1 0 1 0 1 1 1 1 0 0 0 0 1 0 Multiplication par une constante : méthode KCM
  • 53. Introduction aux FPGA Recherche sur les FPGA à Lyon Multiplication série : McLoone and Robshaw, 2007 + Control Logicc r s ‘0’ Stores intermediate multiplication values Performs left shift by 1-bit 16 16 15 1 … … ... … … ... 0 … … ... … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 … … ... 0 011 10 9 8 7 6 11 10 9 8 7 6 011 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 11 10 9 8 7 6 y Architecture de référence en cryptographie embarquée
  • 54. Introduction aux FPGA Recherche sur les FPGA à Lyon Multiplication par une constante : Architecture KCM 16 × 4 bits rom 4 A0-A3 4 bits adder A4-A7 A8-A11 44441 Architecture générée par FloPoCo
  • 55. Introduction aux FPGA Recherche sur les FPGA à Lyon Résultats secret size 128 bits 256 bits 512 bits Actel Igloo VersaTiles parallel impl. 10476 20755 44307 serial impl. 1546 2253 3698 parallel/serial ratio 6.8 9.2 12 Run cycles parallel impl. 8 12 20 serial impl. 339 603 1131 serial/parallel ratio 42.4 50.3 56.55 AGL250 ($20) : 6144 VersaTiles AGL1000 ($100) : 24576 VersaTiles
  • 56. Introduction aux FPGA Recherche sur les FPGA à Lyon Résultats secret size 128 bits 256 bits 512 bits Xilinx Virtex4 Slices parallel impl. 2213 4358 7115 serial impl. 493 784 1377 parallel/serial ratio 4.5 5.5 5.2 Run cycles parallel impl. 8 12 20 serial impl. 339 603 1131 serial/parallel ratio 42.4 50.3 56.55 XC4VSX35 ($600) : 15360 Slices source prix : Digi-Key, 11/2011
  • 57. Introduction aux FPGA Sources Sommaire Introduction Rappels sur les circuits intégrés Structure matérielle Structure générale Cellules élémentaires Composants matériels Composants logiciels Les constructeurs Programmation Flot de conception Synthèse Placement / Routage Tests Recherche sur les FPGA à Lyon Sources
  • 58. Introduction aux FPGA Sources Sources Introduction aux circuits FPGA, Arnaud Tisserand Introduction to FPGA Devices, Boards and tools (Slides from George Manson University) http://www.fpgadeveloper.com/2011/07/ list-and-comparison-of-fpga-companies.html http://www.actel.com http://www.xilinx.com http://www.altera.com http://www.lyrtech.com http://www.digikey.com http://powwow.gforge.inria.fr http://opencores.org