Circuits programmables FPGA-SRAM 1- PRINCIPES et CLASSIFICATION 2- TECHNOLOGIES 3- ARCHITECTURES ET CIRCUITS 4- CONCEPTION : méthodes et outils
5 - APPLICATIONS: LOGIQUE
RECONFIGURABLE
1- LOGIQUE RECONFIGURABLE : PRINCIPES 2- LOGIQUE RECONFIGURABLE : EXEMPLES – comparateurs, opérateurs arithmétiques – filtres, DSP 3- LOGIQUE RECONFIGURABLE : APPLICATIONS – Prototypage, émulation, vérification 4- RECONFIGURATION STATIQUE et DYNAMIQUE 5- PERSPECTIVES – Circuits FPGAs complexes –Logique reconfigurable dans les SOCs
5. 1 Logique reconfigurable : principes FPGA
EPLD
SRAM
Fusible
FPGA SRAM : Reprogrammation statique ou dynamique Pr. Michel ROBERT
logique programmable
Programming technologies : SRAM (FPGAs) SRAM
Programming must be done at each power-up
Word line Bit line
Vcc
Vcc
FPGA-SRAM !C A
A
A B C
S C B
C
S SRAM cells
B S=A.B ?
Pr. Michel ROBERT
logique programmable
0 1 0 1 0 1 1 1
MUX
S
FPGA-SRAM (a) Mise sous tension
S
Vcc
Vcc
E
CONF
CONF
(b) Phase de configuration Entrée « CONF » active : chargement des SRAM (en chaîne) Pr. Michel ROBERT
Gnd
Gnd
(c) Phase d’opération Entrée « CONF » désactivée fonctionnement normal du circuit configuré
logique programmable
5.2 Logique Reconfigurable : Exemples Comparaison à une constante B : Etude de S= A>B avec A = (A7, A6,…,A0) variable 8 bits Equation du comparateur : SB= FB(A7, A6,…,A0) avec FB = A7@(A6@(A5@(A4@(A3@(A2 @(A1@(A0))))))) – avec @= opérateur « ET » ou « OU » – Exemple: B = 129 = 10000001 – S129 = A7.(A6+(A5+(A4+(A3+(A2+(A1))))))) – Exemple: B = 127 – S127 = A7 Pr. Michel ROBERT
logique programmable
5.2 Logique Reconfigurable : Exemples Multiplication par une constante : - Hypothèse : granularité du FPGA-SRAM considéré = LUT 4 - Problème : Soit S (S3,S2,S1,S0) une variable non signée codée sur 4 bits, et A (A3,A2,A1,A0) une constante non signée sur 4 bits. On désigne par P, le produit SxA, codé sur 8 bits. En décomposant S sous la forme S = 23S3 + 22S2 + ......., on peut par un changement de variable écrire P = 4 UxA + LxA, où U et L représentent une variable non signée codée sur 4 bits. Déterminer les fonctions booléennes F et G correspondants respectivement à UxA et LxA. Sachant que les CLB (Blocs logiques Configurables) du FPGA-SRAM considéré contiennent chacun 2 "LUT4", évaluer le nombre de CLB nécessaires pour réaliser la fonction P.
Pr. Michel ROBERT
logique programmable
Exemple : Architecture d ’un filtre numérique FIR Equation aux différences :
y ( n) =
i = N −1
∑ a x(n − i ) i =0
i
Fonction de transfert en Z :
Y ( Z ) i = N −1 −i F (Z ) = = ∑ ai Z X (Z ) i =1
Architecture :
Pr. Michel ROBERT
logique programmable
Architectures d’un filtre FIR
FPGA
DSP 1 Mult.
Add
Traitement séquentiel Architecture figée
Pr. Michel ROBERT
1
2
3
4
Mult.
Mult.
Mult.
Mult.
N
•••
Add
Traitement parallèle Architecture reconfigurable
logique programmable
Mult.
FIR FILTER EXAMPLE N BITS WIDE SAMPLE DATA
Sum of Products Equation PRODUCT
X0
X
•
K Sums
C0
X1
CLOCK = Multiply Time K
X
•
Sample Rate = Clock Rate
C1
X2
OUTPUT DATA
X
• • • •
K Multiplies
SUM
C2
0
• • K COEFFICIENTS •
K TAPS LONG K SUMS
Pr. Michel ROBERT
logique programmable
IMPLEMENTATION ?
Traditional FIR Filter Implementation
General-Purpose DSP 1
– PERFORMANCE =
MAC cycle time X Number of Taps
– TMS320: MAC cycle time = one clock cycle 10-bit, 20-tap filter with 50 MHz TMS320 = 2.5 MHz Additional filter taps slow performance – Pentium: MAC cycle time = 11 clock cycles
Pr. Michel ROBERT
logique programmable
Distributed Arithmetic (DA) Filter Design SAMPLE DATA
8 WORD X N BIT LOOK UP TABLE
MSB
PARALLEL IN SERIAL OUT
000
2 -1 Scaler LOOK UP TABLE
A Binary SHIFT
ADRS
DATA
n
B
R E G I S T E R
n FILTERED DATA OUT
001
C0
010
C1
011
C1 + C0
100
C2
101
C2 + C0
110
C2 + C1
111
C2 + C1 + C0
Clock Frequency PERFORMANCE = Number of Bits in Sample 10-bit, 20-tap filter using XC4000 at 50 MHz = 5 MHz Pr. Michel ROBERT
logique programmable
...000000
5.3 Logique Reconfigurable : Applications Systèmes : – co-processeurs reconfigurables – optimisation d’architectures, à partir de blocs FPGA “embarqués”
CAO : prototypage rapide et émulation
Pr. Michel ROBERT
logique programmable
Reconfigurable technology : FPGAs Why can reconfigurable be faster than microprocessors ?
S=Ax²+By+C Spatial execution:
Temporal execution:
• ASIC-like way to compute • Parallel
• CPU-like way to compute • Sequential
Flexibility Performance
SOMETHING
t2 <- y t3 <- t3.t1 t2 <- B.t2 t3 <- t2+t3 Y
<- t3+C
t1 t2
y
x A
t1 <- x t3 <- A.t1
Performance Flexibility B
C
BETWEEN ?
t3 A B C
ALU
Pr. Michel ROBERT
#CYCLES: 7 logique programmable
#CYCLES: 3 S
5.3 Logique Reconfigurable : Applications PROTOTYPAGE DE SYSTEMES Solutions réalisées à partir de circuits programmables :
– – – –
CARTES « STANDARDS » (Altera, Xilinx) CARTES SPECIFIQUES PLATEFORMES DE PROTOTYPAGE (Aptix, Eve,..) SYSTEMES D’EMULATION (Quickturn)
Pr. Michel ROBERT
logique programmable
Hardware Boards : example
CARTE ALTERA UP-DLP
Pr. Michel ROBERT
logique programmable
Prototypage Matériel : exemple FPGA Flex 10k20
Connecteurs
Starter Kit processeur
RAM
processeur processeur
R A M
A/D D/A
RAM
2 E/S Série
Pr. Michel ROBERT
logique programmable
Exemple : Carte de prototypage HW & SW Code C
VHDL
LOGICIEL
MATERIEL Compilation
HOST PC
Synthèse
Protocole de communication Carte FPGA
Carte TIM 40
DSP TMS 320C40 RAM RAM
RAM RAM
FPGA Xilinx
FPGA Xilinx RAM
RAM
CARTE MERE
Pr. Michel ROBERT
logique programmable
FPGA Xilinx RAM
Exemple : Carte de prototypage HW & SW
Carte TIM40 Carte LIRMM (Logic Inside Reconfigurable Micro Machine)
(a) Vue de dessous
Pr. Michel ROBERT
logique programmable
Carte mère Hunt Engineering
(a) Vue de dessus
Existing reconfigurable systems Xilinx solutions : PCI based FPGA boards
SDRAM modules
Multiple million gates FPGA
PCI bus interface Pr. Michel ROBERT
logique programmable
Existing reconfigurable systems Altera solutions : SOPC (System on a Programmable Chip) Multiple million gates FPGA SDRAM connector
Firewire connector (IEEE1394) serial ports
USB connector PS2 ports
Parallel port Pr. Michel ROBERT
VGA connector logique programmable
Plateforme de prototypage : principe
CIRCUITS RECONFIGURABLES Pr. Michel ROBERT
logique programmable
Plateformes de prototypage
- Expérimentation “rapide” : ~ matériels et logiciels ~ adéquation Algo. / Archit. ~ temps réel - Moyen de prototypage d’applications - Aspects pluridisciplinaires autour de supports communs - Coûts (matériel “standard”)
Pr. Michel ROBERT
logique programmable
Prototypage de systèmes mixtes matériels / logiciels (1) Accélérateurs de simulation
(3) Plateformes Reconfigurables (2) Machines d’émulation µP
D S P µP
µP
µP
µP
µP
FP GA
FP GA
FP GA
FP GA
FP GA
FP GA
FP GA
FP GA
FP GA
Coût et maintenance élevés Pr. Michel ROBERT
F P G A
µ P I P
I P
Flexibilité logique programmable
(4) Cartes Spécifiques
DSP
RAM
FPGA
FPGA
FPGA
FPGA
Faible Coût Architecture figée
PEKEE PROJECT THE CONCEPT OF HYBRID PLATFORM FOR RESEARCH, EXPERIMENTATION AND EDUCATION Ouverte, Evolutive, Modulaire, Autonome Boîtier Carte Fille Coques Carte PC embarqué Carte TP à wrapper
Carte châssis + Bus OPP 2 Moteurs
Accumulateurs intelligents
Pr. Michel ROBERT
logique programmable
Pr. Michel ROBERT
logique programmable
Robot PEKEE : CARTES • Compatible PC : Technologie STPC • Microprocesseur x86 à 75 MHz • 32 Mo SDRAM • Compact Flash 128 Mo (connectique IDE) • Connectique PC : PS/2, VGA, RJ45 et USB • Interface Bus OPP • Alimentation • OS: win9X ou Linux ou autres
• Interfaçage de montages électroniques avec le robot : micro-contrôleurs, FPGA, ASIC, SOC,…
• Communication inter-cartes •Interface Bus OPP / Bus adresses données (16 bits R W CS) Pr. Michel ROBERT
(transparente pour l’utilisateur)
logique programmable
Reconfiguration de FPGA-SRAM S
E
CONF
Phase de configuration
CONF
Phase d’opération:
RECONFIGURATION STATIQUE • Chargement séquentiel de plusieurs architectures • Une architecture par application
RECONFIGURATION PSEUDO-DYNAMIQUE
Couche OPERATIVE conf1
conf2
• Chargement séquentiel de plusieurs architectures • Plusieurs architectures par application conf3
RECONFIGURATION DYNAMIQUE • Chargement continu conf4 • L’architecture évolue en cours de traitement Pr. Michel ROBERT logique programmable
SRAM
SRAM
SRAM
SRAM
SRAM
SRAM
SRAM
SRAM
SRAM
Couche de CONFIGURATION
5.4 Reconfiguration statique et dynamique: SRAM-based FPGAs Initial Concept : fixed configuration for each project
FPGA Load Configuration RUN
Load A FPGA Load B
RUN C A B
Load C Pr. Michel ROBERT
logique programmable
5.4 Reconfiguration statique et dynamique: New Approach : changing the configuration on the fly, in real time FPGA
B A
Load D D C Pr. Michel ROBERT
logique programmable
5.4 Reconfiguration statique et dynamique: Partial / dynamic reconfiguration is the ability to update only a portion of the configuration memory in a FPGA with a new configuration without stopping the functionality of unchanged sections of the FPGA. Dynamic Reconfiguration
Static Core
Dynamic Core 1
Static Core
Xilinx Virtex FPGA Pr. Michel ROBERT
logique programmable
Dynamic Core 2
Fragmentation Temporal plane of configuration
Time
nth reconfig.
2nd reconfig.
y
1st reconfig. Initial config.
Spatial plane of configuration x
Pr. Michel ROBERT
logique programmable
Coprocesseur programmable CPU
Mémoire
E/S
Accés rapide aux registres internes
FPGA RPU (*) Reconfiguration partielle ou complète rapide
(*) Reconfigurable Processing Unit
E/S
Pr. Michel ROBERT
Interface avec le micropocesseur prévu
logique programmable
Exemple : XC6200
(abandonné)
16x16 Tile
1/4 4x4 Block
Address Data
User I/Os
FastMAPtm Interface
User I/Os
User I/Os
Control User I/Os
*Number of tiles varies between devices in family
Pr. Michel ROBERT
logique programmable
Function Cell
VIRTEX Architecture Resources – – – –
CLBs IOBs RAMs Clocks
Partial Reconfiguration
Configuration – bitstream: configuration bitfile – configuration columns » » » » »
Center CLB IOB Block SelectRAM Interconnect Block SelectRAM Content
Pr. Michel ROBERT
Dynamic loading of new hardware modules Change the configuration for each column of the chip
logique programmable
Pr. Michel ROBERT 2 IOBs 2 2 2 IOBs GCLKs IOBs
logique programmable 2 IOBs
Right IOB Column
Block SelectRAM Content
Block SelectRAM Interconnect
2 2 2 IOBs GCLKs IOBs
CLB Column
CLB Column
Center Column
2 IOBs
CLB Column
CLB Column
Block SelectRAM Interconnect
Block SelectRAM Content
Left IOB Column
Configuration Columns
VIRTEX Architecture 2 IOBs
Existing reconfigurable systems Altera solutions :Excalibur products Low-Cost High-Performance Embedded Processor Custom DSP
Multi-Processor System
ESB
ESB
ESB
ESB ESB
ESB ESB
APEX EP20K200E
ESB ESB
ACEX™ EP1K100
150K Gates Available
ESB
75K Gates Available
ESB ESB
Excalibur ARM 922T + Memory
DSP
500K Gates Available
Pr. Michel ROBERT
logique programmable
Excalibur XA10
Existing reconfigurable systems Altera solutions :Excalibur products • Several millions gates FPGAs • Hard / Soft processors (NIOSTM , ARMTM )
Excalibur NIOS (soft processor)
Excalibur ARM (hard processor)
Pr. Michel ROBERT
logique programmable
5.5 Circuits programmables : perspectives
µC1
DSP RAM
Bloc FPGA
- complexité croissante (loi de moore) - organisation hiérarchique : blocs dédiés - bus d’interconnexions ? - outils de CAO HW & SW ? Pr. Michel ROBERT
logique programmable
5.5 Circuits programmables : perspectives
Architectures multi-processeurs
Exemple : Altera série Stratix
Exemple : Altera xxxx EPXA10 re* série APEX
EP1S120 (2003)
Maximum System Gates
1,772,000
Typical Gates (IEEE)
1,000,000 38,400
LEs
Blocs Logiques : Blocs mémoires 512 bits : Blocs mémoires 4Kbits : Blocs Méga RAM : Blocs DSP (MAC + registres +..) : E/S : Pr. Michel ROBERT
114140 1118 520 12 28 1310
Embedded System Blocks (ESBs) Maximum RAM Bits Maximum User I/O Pins
160
327,680 521
Single-Port SRAM
256 Kbytes
Dual-Port SRAM
128 Kbytes
Total Ram Bits (PLD + Stripe)
3,473,408
logique programmable
Evolution des systèmes microélectroniques : perspectives MATERIEL STANDARD ou SPECIFIQUE ?
Matériel spécifique « SOC »
Hier Circuit standard
A/D
Circuit standard
mémoire
Logique « ASIC »
µP
D/A
mémoire
P=>S
Analog
RAM
S=>P
µC
Aujourd’hui FPGA
FPGA
ROM
• Programmable (HW & SW) • Complexité • Performances REUTILISATION
DSP
ASIC µP
ASIC
mémoire
ASIC
Demain
ASIC
mémoire
Analog
“ASIC based system”
Matériel standard FPGA
FPGA
« FPGA-based system »
• Prototype rapide
FPGA µP
FPGA
FPGA
mémoire
FPGA
mémoire
- composants standards, - composants programmables Pr. Michel ROBERT
logique programmable
• Programmable • Reconfigurable FPGA > 1M portes
5.5 Circuits programmables : perspectives
Circuits Evolutions : standard or custom ? 989 ) 1 ( e v a W Makimoto’s
standard
hardwired
1977
2007
1987
ASICs, accel’s
ble ra igu nf
custom
LSI, MSI
structural programming
co re
1957
procedural programming
µproc., memory
TTL 1967
“The Programmable System-on-a-Chip is the next wave“
1997
algorithm: fixed
algorithm: variable
algorithm: variable
resources: fixed
resources: fixed
resources: variable
Pr. Michel ROBERT
logique programmable
Familles d’architectures
Spécifique (ASIC)
Microprocesseurs DSP Accélérateurs
Processeurs reconfigurables
VLIW
ASIC reconfigurables (filtres…)
FPGA Reconfigurable
Pr. Michel ROBERT
logique programmable
5.5 Perspectives : Architectures programmables et SOCs
DSP
RAM
Custom Logic CPU
Reconfigurable Logic
Pr. Michel ROBERT
logique programmable
5.5 Perspectives : Architectures programmables et SOCs System-on-Chip Architectures “Silicon board” : put on a chip what we used to put on one or several boards CPUs
Memory
Embedded Software
Reusable IP Communication network Reconfigurable Interconnect Analog RF
Reconfigurable logic
Hardwired logic
- Heterogeneous components - Complex on-chip communication network - HW/SW trade offs Pr. Michel ROBERT
www
logique programmable
Environment
Heterogeneous Reconfigurable System-on-a-Chip Light weight general purpose processor for control intensive oriented (parts of) algorithms
Flexibility for bit level oriented algorithms
Pr. Michel ROBERT
Flexibility for coarse grained oriented algorithms (in a particular application domain) (e.g. DSP algorithm)
logique programmable
Reconfiguration dans un système sur puce (SOC) - Consommation - Stockage de données - Transfert de données
RAM2
µP
RAM
RAM3
Memory management
RAM1
Reconfigurable core
PRG MEM
RAM4
I-cache
Frame Buffer Input
D-cache Memory management
Frame Buffer Output
Interface
Programmable interconnect
Bus arbitrer Timers, IOs, UARTS…
Pr. Michel ROBERT
Timers, IOs, UARTS…
logique programmable
Interface
Architectures : du « grain fin » au « grain épais » GRAIN FIN
bit
mot
CLB
hybride Cœur reconfigurable
Reg FILE
ALU + MULT
algorithme
application
Cœur
Cœur
FPGA DSP
DCT
GRAIN ÉPAIS
MPEG4
Granularité ?
Système sur puce HW-SW Pr. Michel ROBERT
logique programmable
Coarse grain RAs Kress Array (univ. of Kaiserlautern) • PE (reconfigurable Processing Element) contains: rALU, small register file, routing resources • rALU operations: arithmetic, relational, logic, special, xfer-only • PE use: operations, routing only, routing and operations • routing-only use adds flexibility • pipe-like asynchronous inter-PE communication • smart interface for data scheduling (data streams entering and leaving the FPAA)
Generalization of Systolic Arrays : Super systolic array
Pr. Michel ROBERT
logique programmable
Kress Array (univ. of Kaiserlautern) Symmetric Nearest Neighbour filter (SNN) using 8 NN ports / 16 global buses
Pr. Michel ROBERT
logique programmable
Systolic RIng Maximize flexibility, performances, and minimize programming difficulty… Switch 1
N1,1 N1,2
Switch 2
N2,1 N2,2
flexibility BN1
BN3
Switch 3
BN2
BN4
Switch 4
RISC Fine grain Reconfigurable logic CISC
VLIW SIMD
Programming difficulty Pr. Michel ROBERT
logique programmable
N3,1
N3,2
N4,1 N4,2
SYSTOLIC RING Parallelism
Activités liées à la recherche : architectures reconfigurables Grain épaisreconfigurable) Grain épais (Architecture
Grain F Grain fin (FPGA)
Opérateurs ALU, MULT arithmétiques Multiplexeurs Registres
I/O
Dnode
Dnode
Switch Dnode
Dnode
h tc i Sw
Dnode
Dnode Dnode
Pr. Michel ROBERT
Dnode
e r u t c u r t u S a e n An
3200 MIPS@200MHz
Dnode
Switch Dnode
Dnode
h it c w S
Breveté
Dnode
Flot de données Direct
Switch
Dnode
Dnode
Switch
Sw i tc h
I/O
Dnode
Sw i tc h
Dnode
logique programmable 16 Dnodes version
personnalisable...
2 levels dynamically reconfigurable architecture: • Global mode (first level) The program which manages the configuration runs on the RISC processor The configuration of an entire cluster can be modified at each clock cycle The operating layer computes the data coming from the host processor
• Local mode (second level) Each Dnode runs his own up-to-8 instructions program OPERATING layer
Dnode A
+
B
Reg FILE
ALU + M ULT
+
CONFIGURATION layer 2
* RAM
*
S
3 DATA
CONFIG
Config Controller Pr. Michel ROBERT 1
MANAGEMENT CODE
logique programmable
Host µP
1
2 3
Systolic Ring Dnode : word-level processing unit Constitution
µinst.
• Optimized Datapath (16 bits) • Register File (4x16bits) • Hardwired ALU and multiplier
Reg FILE
Features • Complex computations in local mode (FIR,IIR, WT…) • Low silicon area (0.07mm², 0.18µm CMOS process) • Single-cycle operations (ex:MAC+register load)
ALU + MULT
Pr. Michel ROBERT
logique programmable
Forward dataflow
Systolic Ring architecture
No complex data routing problems (crossbars…) Unidirectional data transfers between adjacent layers (pipeline) Linear performances increase with Dnode number Provides 3200 MIPS@200MHz of computing power for a 16 Dnodes realization
D-Node
D-Node D node
I/O
Switch
Switch components:
Switch
Direct FIFO connection for Data injection
Layer n-1
I/O
Forward Dataflow
Switch
I/O
D-Node
D-Node D node
BUS connection for RISC communication Full connectivity between 2 Dnode layers
D-Node Node
I/O
Switch
D-Node
Switch
Layer n+1
D-Node D node
Switch
D-Node
D-Node D node
logique programmable
I/O
D-Node
D-Node
I/O
Layer n
D-Node
Switch
D-Node
D-Node
Global mode : FPGA like Pr. Michel ROBERT
Config. controller
Switch
D node
Local mode : stand-alone
D-Node
I/O
D node
D-Node
I/O
Forward dataflow
Systolic Ring architecture Peak power : 3200 MIPS@200MHz (16 Dnodes version) Dnode
Dnode
Dnode E/S
Dataflow
Dnode
Dnode
Dnode
Layer n E/S
Layer n+1
Dnode Switch
E/S
Dnode
Switch
Dnode
Switch
E/S
Dnode
Dnode
Dnode
Pr. Michel ROBERT
Switch
Dnode
Switch
Dnode
Switch
Switch
E/S
Dnode
Switch
E/S
Dnode
logique programmable
Systolic Ring Switch 1
Switch 2
N2,1 N2,2
N1,1 N1,2 BN1
Architectures Reconfigurables Dynamiquement ARD@LIRMM
BN3
BN2
Switch 3
MRAM-FPGA
BN4
Switch 4 CG
CG
N4,1
N3,2
N3,1
N4,2
CG
CLB
CG
CLB
CG CG Dnode
Dnode
Dnode
Switch
Switch
I/O
Dnode
Dnode
Dnode
I/O Dnode
Dnode
Dnode
Dnode
Dnode
I/O
Dnode Switch
Switch
I/O
Dnode
Switch
Dnode
CLB
Switch
Dnode
Switch
I/O
CLB
Switch
Dnode
I/O
Magnetic Tunnel Junction Non volatility, remancence Shadowed reconfiguration Dynamical reconfiguration High timing performances
Banque de Registre
ALU + MULT
Dnode
Pr. Michel ROBERT
logique programmable
CG