Upload
manas-bhatt
View
243
Download
0
Embed Size (px)
Citation preview
8/17/2019 FPGA Architecture and Implementation
1/59
FPGA ARCHITECTURE ANDITS DESIGN METHODOLOGY
8/17/2019 FPGA Architecture and Implementation
2/59
COMPARE AN FPGA AND DSP
Filte
8/17/2019 FPGA Architecture and Implementation
3/59
DIGITAL LOGIC
Logic Gates
Transistor Switches
< 40 nm ! $$$
MOORE’S LA
8/17/2019 FPGA Architecture and Implementation
4/59
DIGITAL LOGIC
Black BoxSUM of PRODUC
Truth Table(Look Up TableLUT)
Digital Logic Function
3 Inputs
Product AND (&)Sum OR (|)
8/17/2019 FPGA Architecture and Implementation
5/59
WHAT ARE PROGRAMMABCHIPS? As compared o !ard"#$red c!$ps% pro&ramma'(e c!$ps ca) 'e c*som
per )eeds o, !e *ser '- pro&ramm$)&
T!$s co).e)$e)ce% co*p(ed #$! !e op$o) o, re"pro&ramm$)& $) casepro'(ems% ma/es !e pro&ramma'(e c!$ps .er- arac$.e
O!er 'e)e0s $)c(*de $)sa) *r)aro*)d% (o# sar$)& cos a)d (o# r
As compared o pro&ramma'(e c!$ps% ASIC 1App($ca$o) Spec$0c I)e&C$rc*$2 !as a (o)&er des$&) c-c(e a)d cos($er ECO 1E)&$)eer$)& C!a)
S$((% ASIC !as $s o#) mar/e d*e o !e added 'e)e0 o, ,aser per,oa)d (o#er cos $, prod*ced $) !$&! .o(*me
Pro&ramma'(e c!$ps are &ood ,or med$*m o (o# .o(*me prod*cs3 I, more !a) 45%555 c!$ps% &o ,or ASIC or !ard cop-
8/17/2019 FPGA Architecture and Implementation
6/59
WHAT IS A6AILABLE? PLA 1Pro&ramma'(e Lo&$c Arra-2 $s a s$mp(e 0e(d pro&ramma'(e c
!as a) AND p(a)e ,o((o#ed '- a) OR p(a)e3 I $s 'ased o) !e ,ac (o&$ca( ,*)c$o) ca) 'e #r$e) $) SOP 1S*m o, Prod*cs2 ,orm !*s,*)c$o) ca) 'e $mp(eme)ed '- AND &aes &e)era$)& prod*cs #,eed o a) OR &ae !a s*ms !em *p
CPLD 1Comp(e7 Pro&ramma'(e Lo&$c De.$ce2 co)s$ss o, m*($p(e P'(oc/s !a are $)erco))eced o rea($+e (ar&er d$&$a( s-sems
FPGA 1F$e(d Pro&ramma'(e Gae Arra-2 !as )arro#er (o&$c c!o$cesmore memor- e(eme)s3 LUT 1Loo/*p Ta'(e2 ma- rep(ace ac*a( (o
8/17/2019 FPGA Architecture and Implementation
7/59
COMPARE PAL% PLA% PROM
8/17/2019 FPGA Architecture and Implementation
8/59
PROGRAMMABLE LOGIC DE6ICES PLDS
Un-programm
SUM of PRODUCTS
(Re-)Programmble Links Recongrable !LU" LO!#C
Logic Functions
Planes oANDs, O
Inputs
Outputs
ANDs
ORs
8/17/2019 FPGA Architecture and Implementation
9/59
8/17/2019 FPGA Architecture and Implementation
10/59
COMPLE8 PLDS CPLDs Programmable PLD $locks
Programmable #nterconnects "lectricall% "rasable links
CPLD Architecture
Feedback Outp
8/17/2019 FPGA Architecture and Implementation
11/59
PROGRAMMABILITY9 WHEDO FPGA:S FIT?#ntel CPU
T# DSP
MltiCore
Man%Core
!PU
FP!&
&SSP
&S#C
Fle'ibilit% Programming &bstraction
Performance &rea an Po*er "+
CPU,• Mar/e"a&)os$c• Access$'(e o ma)-pro&rammers 1C;;2• F(e7$'(e% pora'(e
&S#C• Mar/e"spec$0c• Fe#er pro&ram• R$&$d% (esspro&ramma'(e• Hard o '*$(d1p!-s$ca(2
FP!&,• Some#!a Resr$cedMar/e• Harder o Pro&ram16er$(o&2• More e
8/17/2019 FPGA Architecture and Implementation
12/59
Which Way to Go?
Off-the-shelf
Low development cost
Short time to market
Re-configurability
igh performance
ASICs FPGAs
Lo# po#er
Lo# cos $)!$&! .o(*mes
ASIC D i E l F t i i it/G
8/17/2019 FPGA Architecture and Implementation
13/59
Local
Memory
Global Memory
ASIC Design Example – Factoring circuit/G
ASIC 130 "i t II #000
8/17/2019 FPGA Architecture and Implementation
14/59
51x
ASIC 130 nm s! "irtex II #000
Factoring/GMU19.80 mm
1 9
. 6 8 m m
2.7 mm
2.82 mm
Area o$ %ilinx "irtex
F&GA
(estimation by R.J. Lim
M# $%esis" &'" 2
Area o$ an ASIC 'it( e)uialent $unctionalit*
8/17/2019 FPGA Architecture and Implementation
15/59
WHAT IS FPGA
F$e(d Pro&ramma'(e Gae Arra-
=S$mp(e: Pro&ramma'(e Lo&$c B(oc/s Mass$.e Fa'r$c o, Pro&ramma'(e I)erco))ecs
Sa)dard CMOS I)e&raed C$rc*$ ,a'r$ca$o) process as ,or memor- c!1Moore:s La#2
A) FP!& is a eice t.at contains a matri' of recongrabarra% logic circitr%/
FPGAs are r*(- para((e( $) )a*re $e !e per,orma)ce o, o)e par o
app($ca$o) $s )o a>eced #!e) add$$o)a( process$)& $s added3
FPGAs *se ded$caed !ard#are ,or process$)& (o&$c a)d do )o !aopera$)& s-sem 3
FP!& can be Partiall% recongrable *.ile rest of t.e c.i0rnning
8/17/2019 FPGA Architecture and Implementation
16/59
• Lo&$c '(oc/s
+ o $mp(eme) com'$)a$o)a(
a)d se*e)$a( (o&$c
• I)erco))ec
+ #$res o co))ec $)p*s a)d
o*p*s o (o&$c '(oc/s
• I@O '(oc/s
+ spec$a( (o&$c '(oc/s a per$p!er-
o, de.$ce ,or e7er)a( co))ec$o)s
WHAT IS INSIDE FPGA
! " #$G% d
8/17/2019 FPGA Architecture and Implementation
17/59
!a"or #$G% vendors
SR%!-based #$G%s
&ilin' (nc) * www)'ilin')com
%ltera +orp) * www)altera)com
%tmel +orp) * www)atmel)com
Lattice Semiconductor +orp) * www)latticesemi)com
%ntifuse and flash-based #$G%s
%ctel +orp) * www)actel)com
,uickLogic +orp) * www)uicklogic)com
FPGA families
8/17/2019 FPGA Architecture and Implementation
18/59
FPGA families
enor Lo* cost 1ig. 0erformanc
8$($)7 Spara) %L%E 6ere7 L8@S8@F8%6ere7 L8
A(era C-c(o)e II%III Sra$7 II %II G8
8/17/2019 FPGA Architecture and Implementation
19/59
Ho# o ma/e (o&$c '(oc/s pro&ramma'(e?
2.en a FP!& is congre t.e internal circitr% is connecte
in a *a% t.at creates a .ar*are im0lementation of t.esoft*are a00lication/
T!ese #$res are co))eced '- !e *ser a)d !ere,ore m*s *se a)e(ecro)$c de.$ce o co))ec !em
C!eap@,as ,*se co))ec$o)s sma(( area 1ca) 0 (os o, !em2
(o# res$sa)ce #$res 1,as e.e) $, $) m*($p(e se&me)s2
.er- !$&! res$sa)ce #!e) )o co))eced
sma(( capac$a)ce 1#$res ca) 'e (o)&er2
8/17/2019 FPGA Architecture and Implementation
20/59
PROGRAMMING TECHNOLOGIES
• Fse an anti-fse ( One Time Programming)
+ ,*se ma/es or 'rea/s ($)/ 'e#ee) #o #$res + -p$ca( co))ec$o)s are 5"55 o!m
+ o)e"$me pro&ramma'(e
• Flas. 3 "PROM base (Mlti0le Time Programming
+ H$&! de)s$-
+ Process $ss*es
• R&M-base-0ass transistors controlle b% an SR&M
cell (Mlti0le time Programming)
+ memor- '$ co)ro(s a s#$c! !a co))ecs@d$sco))ecs #o #$
+ -p$ca( co))ec$o)s are 3"4 o!m
+ ca) 'e pro&rammed a)d re"pro&rammed eas$(- 1esed a ,aco
8/17/2019 FPGA Architecture and Implementation
21/59
SRAM:
• I) SRAM pro&ramm$)& ec!)o(o&- SRAM ce(( $s *sed osore !e daa #!$c! spec$0es #!e!er a co))ec$o) !as o'e made or )o3 T!e SRAM ce(( dr$.es !e &ae o, passra)s$sor o) !e c!$p e$!er *r)$)& pass ra)s$sor orra)sm$ss$o) &ae on o ma/e a co))ec$o) or of o 'rea/a co))ec$o)3
• T!e ad.a)a&e o, SRAM ec!)o(o&- $s !a des$&)ersca) re*se c!$ps d*r$)& proo-p$)& a)d a s-sem ca) 'ema)*,ac*red *s$)& ISP3 T!e o!er ad.a)a&e $s orepro&ram a c!$p '- do#)(oad$)& a )e# co)0&*ra$o) 0(e3
SRAM TYPE FPGA INTERCONNECT
8/17/2019 FPGA Architecture and Implementation
22/59
SRAM"TYPE FPGA INTERCONNECTARCHITECTURE 1CONTD2
PSM
Cell ConnectionMatri' (CCM)
8/17/2019 FPGA Architecture and Implementation
23/59
: A)$ ,*ses are or$&$)a((- ope) c$rc*$s a)d a
o) (o# res$sa)ce o)(- #!e) pro&rammed3 W!
*)pro&rammed% !e $)s*(aor $so(aes !e op a'oom (a-ers% '* #!e) pro&rammed $)s*(aor c!a)&es o 'ecome a (o#"res$sa)($)/3
8/17/2019 FPGA Architecture and Implementation
24/59
EPROM
T!e EEPROM@FLASH ce(( $) FPGAs ca) 'e *sed $) #o #a-s% as a cde.$ce as $) a) SRAM ce(( or as a d$rec(- pro&ramma'(e s#$c!3 Was a s#$c! !e- ca) 'e .er- e
8/17/2019 FPGA Architecture and Implementation
25/59
COMPONENTS OF MODERN FPGAS
8/17/2019 FPGA Architecture and Implementation
26/59
8$($)7 CLB
8/17/2019 FPGA Architecture and Implementation
27/59
8$($)7 CLB
8/17/2019 FPGA Architecture and Implementation
28/59
CONFIGURATION LOGIC BLOCS 1C
I) 8$($)7 (o&$c '(oc/ Loo/ *p a'(e LUT $s *sed o $mp(eme)a)- )*m'er o, d$>ere) ,*)c$o)a($-
33 CONTD
8/17/2019 FPGA Architecture and Implementation
29/59
33 CONTD
T!e $)p* ($)es &o $)o !e $)p* a)d e)a'(e o, (oo/*p a'(e T!e o*p* o, !e (oo/*p a'(e &$.es !e res*( o, !e (o&$c,*)c$o) !a $ $mp(eme)s3 Loo/*p a'(e $s $mp(eme)ed*s$)& SRAM
8/17/2019 FPGA Architecture and Implementation
30/59
LOOUP TABLE
A LUT 1Loo/*p a'(e2 $s a o)e '$ #$de memor- arra-
A "$)p* AND &ae $s rep(aced '- a LUT !a !as ,o*r address $)po)e s$)&(e '$ o*p* #$! 4 o)e '$ (oca$o)s
Loca$o) 4 #o*(d !a.e a (o&$c .a(*e =4: sored% a(( o!ers #o*(d '
LUT:s ca) 'e pro&rammed a)d repro&rammed o c!a)&e !e (o&$c,*)c$o) $mp(eme)ed
8/17/2019 FPGA Architecture and Implementation
31/59
LUTS
LUT co)a$)s Memor- Ce((s o $mp(eme) sma(( (o&$c,*)c$o)s
Eac! ce(( !o(ds =5: or =4: 3
Pro&rammed #$! o*p*s o, Tr*! Ta'(e
I)p*s se(ec co)e) o, o)e o, !e ce((s as o*p*
Co)0&*red '- re"pro&ramma'(e SRAM memor- ce((s3 Inputs LUT -> 8 Memory Cells
Static Random Access MemSRAM cells
3 – 6 Inputs
Multiplexer MUX
CONFIGURING LUT
8/17/2019 FPGA Architecture and Implementation
32/59
CONFIGURING LUT
a + c *
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
Re*$red F*)c$o)
Tr*! Ta'(e Pr
• L,$ is a R-M it% /ata i/t% o 1bit.
• $%e contents are ro!ramme/ at oer
• Lo!ic nctions imlemente/ in Loo3 , $able• Mltilexers (select 1 o 4 ints*
LUT (LOOK UP TABLE) FUNCTIONALITY
8/17/2019 FPGA Architecture and Implementation
33/59
LUT (LOOK-UP TABLE) FUNCTIONALITY
• Look-.p tables are
primary elements
for logic
implementation• /ach L.0 can
implement any
function of 1
inputsx1 x2 x x)
y
x1 x2
y
L,$
x1x2xx)
y
0
x10
x2 x x)0 0
0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 0
1 1 1 1
y
0
10001010100110
0
0
x10
x2 x x)0 0
0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 0
1 1 1 1
y
1
11111111111000
0
x1 x2 x x)
y
x1 x2 x x)
y
x1 x2
y
x1 x2
y
L,$
x1x2xx)
y
0
x10
x2 x x)0 0
0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 0
1 1 1 1
y
0
10001010100110
0
0
x10
x2 x x)0 0
0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 0
1 1 1 1
y
0
10001010100110
0
0
x10
x2 x x)0 0
0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 0
1 1 1 1
y
1
11111111111000
0
0
x10
x2 x x)0 0
0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 0
1 1 1 1
y
1
11111111111000
0
2(S0R(5.0/2 R%!
8/17/2019 FPGA Architecture and Implementation
34/59
RAM%$1S
O
!
"E
"CL
K A#
A1
A$
A%
A&
RA!#
"
"A#
A
A$
A%
23
4
4L.0
L.0
'
L.0
'
2(S0R(5.0/2 R%!
• +L5 L.0 configurable as 2istributed R%!
• % L.0 euals 36'3 R%!
• (mplements Single and 2ual-$orts
• +ascade L.0s to increase R%! si7e
• Synchronous write
• Synchronous8%synchronous read
• %ccompanying flip-flops used for synchronous read
S(#0 R/G(S0/R
8/17/2019 FPGA Architecture and Implementation
35/59
L.0
(9+/
+L
:
2/$0;
L.0 4
S(#0 R/G(S0/R
• /ach L.0 can be configured as shiftregister Serial in@ serial out
• 2ynamically addressable delay up to 36cycles
• #or programmable pipeline• +ascade for greater cycle delays• .se +L5 flip-flops to add depth
+%RRC B +O90ROL LOG(+
8/17/2019 FPGA Architecture and Implementation
36/59
+O.0
!
CK
S
R EC
!
CK
R EC
O
G1G<GAG3
L''*-U+
Ta,le+arry
B
+ontrol
Logic
O
C5C
#1#<#A#3
&5&
L''*-U+
Ta,le
#D(9
5C
SR
S
+arry
B
+ontrol
Logic
+(9+L: +/ SL(+/
+%RRC B +O90ROL LOG(+
#%S0 +%RRC LOG(+
8/17/2019 FPGA Architecture and Implementation
37/59
/ach +L5 contains separate logic androuting for the fast generation of sum Bcarry signals(ncreases efficiency and performance of
adders@ subtractors@ accumulators@comparators@ and counters
+arry logic is independent of normallogic and routing resources
#%S0 +%RRC LOG(+
LSB
MSB
C
a ( ( - L ' . i /
R ' 0 1 i 2 .
+L5 SL(+/ S0R.+0.R/
8/17/2019 FPGA Architecture and Implementation
38/59
+L5 SL(+/ S0R.+0.R/
• /ach slice contains two sets of the following=• #our-input L.0
• %ny 1-input logic function@
• or 36-bit ' 3 sync R%!
• or 36-bit shift register
• +arry B +ontrol• #ast arithmetic logic
• !ultiplier logic
• !ultiple'er logic
• Storage element• Latch or flip-flop
• Set and reset
• 0rue or inverted inputs
• Sync) or async) control
5LO+: R%!
8/17/2019 FPGA Architecture and Implementation
39/59
Bl'/* RAM
S+aa2-%
!0al-P'
Bl'/* RAM
P '( 1 A
P '( 1 B
5LO+: R%!
• Mos e
8/17/2019 FPGA Architecture and Implementation
40/59
4 8 4 MULTIPLIER• Em'edded 4"'$ 7 4"'$ m*($p($er• :s comp(eme) s$&)ed opera$o)
• M*($p($ers are or&a)$+ed $) co(*m)s
• Fas ar$!me$c ,*)c$o)s• Op$m$+ed o $mp(eme)• m*($p(- @ acc*m*(ae mod*(es
13 4 13M0li+lie
O0+0(%6 ,is)
!aa5A(13 ,is)
!aa5B(13 ,is)
8/17/2019 FPGA Architecture and Implementation
41/59
(O5 #.9+0(O9%L(0C
• (O5 provides interface between the package pins and +L5s
• /ach (O5 can work as uni- or bi-directional (8O
• Outputs can be forced into igh (mpedance
• (nputs and outputs can be registered
• advised for high-performance (8O
• (nputs can be delayed
8/17/2019 FPGA Architecture and Implementation
42/59
FPGA !ESIGNFLO"
0R%9SL%0(9G % 2/S(G9 0O %9 #
8/17/2019 FPGA Architecture and Implementation
43/59
0R%9SL%0(9G % 2/S(G9 0O %9 #
CAD o ra)s(ae c$rc*$ ,rom e7 descr$p$o) o p!-s$ca($mp(eme)a$o) #e(( *)dersood3
Mos c*rre) FPGA des$&)ers *se re&$ser"ra)s,er (e.e( spec$0ca$1a((oca$o) a)d sc!ed*($)&2
Same 'as$c seps as ASIC des$&)3
RTL
/ / C 4 &5$ /
Circuit
&$
5 C
Array
!ESIGN PROCESS RTL Circuit
8/17/2019 FPGA Architecture and Implementation
44/59
!ESIGN PROCESS
Spec
!odule R+DE clock@ reset@ encrFdecr@
dataFinput@ dataFoutput@
outFfull@ keyFinput
keyFread
H
IIII))
Specification
J2L8Jerilog description ESource #iles
#unctional simulation
$ost-synthesis simulationSynthesis
9etlist
C 4 &5$ /
Circuit
&$
5 C
D"S#!6 PROC"SS (7)
8/17/2019 FPGA Architecture and Implementation
45/59
( )
Imp(eme)a$o)1Mapp$)&% P(ac$)& Ro*$)&2
Co)0&*ra$o)
T$m$)& s$m*(a$o)
O) c!$p es$)&
8/17/2019 FPGA Architecture and Implementation
46/59
DESIGN PROCESSIN DETAIL
Logic S%nt.esis
8/17/2019 FPGA Architecture and Implementation
47/59
!odule !L.E IH
Reg %3@53@C3H
Reg !.&F>@ !.&F3@ !.&FA@ !.&F?%=%H
53K4E9/GF54>?5=5H
CK4E9/GFC4>C3=C3H
!.&F>K4%3 B 53H
!.&F3K4%3 M 53H
!.&FAK4%3 N 53H!.&FP
>= C3K4!.&F>
3= C3K4!.&F>3
A= C3K4!.&FAH
8/17/2019 FPGA Architecture and Implementation
48/59
• (nterpret R0L code
• $roduce synthesi7ed circuit netlist in a standard /2(# format
• Give preliminary performance estimates
• Some can display circuit schematics corresponding to /2(# netlist
Ma00ing
8/17/2019 FPGA Architecture and Implementation
49/59
L.0A
L.0<
L.01
L.0D
L.03##3
##A
L.0>
Placing FPGA
8/17/2019 FPGA Architecture and Implementation
50/59
+L5 SL(+/S
Roting FPGA
8/17/2019 FPGA Architecture and Implementation
51/59
P'.amma,le C'22e/i'2s
CONFIGURATION OF SRAM BASED FPG
8/17/2019 FPGA Architecture and Implementation
52/59
O)ce a des$&) $s $mp(eme)ed% -o* m*s creae a 0(e !a !e FPGA ca)*)dersa)d 13'$ e7e)s$o)2
T!e BIT 0(e ca) 'e do#)(oaded d$rec(- o !e FPGA% or ca) 'e co).ered$)o a PROM 0(e #!$c! sores !e pro&ramm$)& $),orma$o)
M$(($o)s o, SRAM ce((s !o(d$)& LUTs a)d I)erco))ec Ro*$)&
6o(a$(e Memor-3 Lose co)0&*ra$o) #!e) 'oard po#er $s *r)ed o>3
eep B$ Paer) descr$'$)& !e SRAM ce((s $) )o)"6o(a$(e Memor- e3&3PROM or D$&$a( Camera card
Co)0&*ra$o) a/es J secs
JTAG
JTAG Port
ProgrammingBit File
8/17/2019 FPGA Architecture and Implementation
53/59
USER CONSTRAINTS F$(e co)a$)s .ar$o*s co)sra$)s ,or 8$($)7
C(oc/ Per$od
C$rc*$ Loca$o)s Pin Locations
E.er- p$) $) !e op"(e.e( *)$ )eeds o !a.ea p$) $) !e UCF
8/17/2019 FPGA Architecture and Implementation
54/59
CONSTRAINTS
NET KCLOCK LOC K645K IOSTANDARD KL6CMOSK NET KSEG5K LOC KT4K IOSTANDARD KL6CMOSK
NET KSEG4K LOC KT4K IOSTANDARD KL6CMOSK
6IRTE8 CLB
8/17/2019 FPGA Architecture and Implementation
55/59
ARCHITECTURE
LUT BASED FULL ADDER DESIGN
8/17/2019 FPGA Architecture and Implementation
56/59
4 '$ F*(( Adder
8/17/2019 FPGA Architecture and Implementation
57/59
8/17/2019 FPGA Architecture and Implementation
58/59
PIPELINING IDEA
8/17/2019 FPGA Architecture and Implementation
59/59
PIPELINE SOLUTION6ac% li sta!e can oerate at a
Rate t%an beore" bt reslt !oes
-ter $ cloc3s.