![Page 1: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/1.jpg)
129129
Programmable LogicDevices
![Page 2: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/2.jpg)
130130
Aims & Objectives
• To give an introduction into Programmable LogicDevices in use commercially today– And how they are constructed internally
• Specifically, we’ll talk about Field Programmable GateArrays (FPGA’s)
• We’ll derive a fine-grained FPGA to illustrate this
• Then look at other commercial devices and a little into thefuture
![Page 3: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/3.jpg)
131131
Programmable Logic Devices
• Programmable logic devices are a class of ‘chips’ that canbe programmed to perform some system function
![Page 4: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/4.jpg)
132132
Programmable Logic Devices
• Programmable logic devices are a class of ‘chips’ that canbe programmed to perform some system function
• Example- Altera EP910
![Page 5: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/5.jpg)
133133
Problems with Simple PLD’s
• Size– Simple PLD’s typically have a small gate count (<1000 gates)
– Simple combinatorial logic and registers
– Complex devices available- suitable for some applications
• Functionality– Circuit typically only involves sum of products representation
• Programming– Often cumbersome
• For these reasons, we need something a bit better– Ideally a chip which can implement any given digital system
![Page 6: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/6.jpg)
134134
Anatomy of a Digital Logic Circuit
• Digital Logic Circuit (however complex) is just a bunchof primitive gates, FF’s, etc. connected together– Connections are termed nets
Logic Gate
‘Net’
D Q
CLRD Q
CLR
![Page 7: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/7.jpg)
135135
Anatomy of a Programmable Device
• Basically, our programmable devices look as follows:
CLB
Interconnects
Physical Pins
![Page 8: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/8.jpg)
136136
Terminology- I
• CLB= Configurable Logic Block– Degree of ‘complexity’ is called the granularity
– Can implement a single logic function (fine grained)
– Or a block of logic functions (course grained)
– Also, may incorporate registers (‘D’ Type FF’s)
![Page 9: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/9.jpg)
137137
Terminology- II
• Interconnects– Used to connect the CLB’s together
– May be one (or more) interconnects between 2 cells
– Also, different levels of interconnect (e.g. global for clockdistribution)
• Physical Pins– Used for inputs to programmable device (drives CLB’s)
– Used for outputs from programmable device (driven by CLB’s)
– May incorporate additional features (e.g. Tri-State etc.)
![Page 10: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/10.jpg)
138138
Designing a Device- Introduction
• Our goal is to design a fine-grained programmable logicdevice
• We’ll consider gate-level connections– Not really interested in fabrication details
• Mainly concentrating on architecture and implementationdetails– How do we do the routing and how do we build the CLB ?
![Page 11: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/11.jpg)
139139
Background Topics- I
• Multiplexers– Used as data selector (4 ->1)
I0
I1
I2
I3
O
S0
S1
A
B
C
D
Z
S0S1
0
Z
00 11 01 1
ABCD
![Page 12: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/12.jpg)
140140
Background Topics- II
• Universal Logic Module (ULM)– Based on 2->1 multiplexer
– Permits many different logic functions of 2 variables byselection of X0, X1 & SEL
– Choice of connection assignment dictates logic function
I0
I1O
SEL
X0
X1F
F= SEL•X0 + SEL•X1
From truth-table,
![Page 13: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/13.jpg)
141141
Background Topics- III
• ULM ExamplesImplement, F=A•B
SEL= A
X0= A
X1= B
= SEL•X0 + SEL•X1F
= A•A + A•B= 0 + A•B= A•B
= SEL•X0 + SEL•X1F
= A•B + A•B= A⊕B
Implement F=A⊕BSEL= AX0= BX1= not(B)
![Page 14: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/14.jpg)
142142
Design of Config’ble Logic Block (CLB)
• We will use a universal logic module as the basis of ourCLB– Add a small amount of peripheral logic around the ULM to
provide inverts etc.
– e.g. in XOR example above, needed B
I0
I1O
SEL
X0
F
X1
![Page 15: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/15.jpg)
143143
Final Configurable Logic Block (CLB)
• Also, require provision for registers in the system– C/S controls either combinational or synchronous output
I0
I1O
SEL
X0
FX1 I0
I1O
D Q
C/S
Register
![Page 16: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/16.jpg)
144144
Routing- Introduction
• Our basic device will offer only local routing– So can input and output from adjacent cells only
• Example
CLB CLB
CLB CLB
N
S
EW
![Page 17: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/17.jpg)
145145
Routing Requirements
• Require routing resources to permit routing between non-adjacent cells
• Example- want to route from cell ‘A’ to cell ‘C’– This is achieved by routing through cell ‘B’
A B
C
![Page 18: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/18.jpg)
146146
Routing Detail- I
• So, each cell has inputs and outputs in each of theN, S, E, W directions
N
S
EW
CLB
Eout
Ein
Nout Nin
Sin Sout
Win
Wout
![Page 19: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/19.jpg)
147147
Routing Detail- II
• Require routing to be able to route from any adjacent cellto any other locally adjacent cell– This permits routing between non-adjacent cells
N
S
EWNout
Eout
Sout
Win
![Page 20: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/20.jpg)
148148
Routing Detail- III
• Also, drive any combination of the N, S, E, W outputsfrom the output of the ULM (F)
Nout
Eout
Sout
WoutULM
![Page 21: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/21.jpg)
149149
Routing Implementation
• Implementation is fairly trivial using multiplexers– 4->1 mux on each of the N, E, S, W outputs
Nout
Eout
Sout
Wout
Nin
Sin
Win
F
![Page 22: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/22.jpg)
150150
Routing to ULM
• So, how are the inputs to the ULM controlled ?– Again with multiplexers
– X0, X1, SEL driven by individual mux selecting N, S, E, W
I0
I1O
SEL
X0
X1
NinEinSinWin
NinEinSinWin
NinEinSinWin
![Page 23: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/23.jpg)
151151
Final CLB Configuration
ULM F
X0
X1SEL
![Page 24: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/24.jpg)
152152
Configuring the Device- I
• How is the device configured ?
• Each of the multiplexers are controlled by SRAMconfiguration bits
• Example, ULM cell:– Here 2 bits are used to control
the mux’s for X0, X1 in ULM
SRAM configuration bit 0 1
X0 X1
![Page 25: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/25.jpg)
153153
Configuring the Device- II
• For each CLB, there are 17 programming (configuration)bits
• 2 for each of the CLB output multiplexers (8)
• 1 each for X0,X1 selection multiplexers (2)
• 2 for each of the ULM input multiplexers (6)
• 1 for combinatorial/ sequential multiplexer (1)
• So, entire device can be configured simply byprogramming the desired bitstream (generatedautomatically by software) in ‘The Field’– Field Programmable Gate Array
![Page 26: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/26.jpg)
154154
Summary of Device
• We have developed a simple fine-grained device
• Note the regular structure– We can have any number of CLB’s on a physical device- simply
add more cells onto the mask
• So, does it work ?
• The above is really a derivation of a commercial devicecalled a Xilinx XC6200– This device has a number of additional features (e.g. more
routing resources etc.)
– But the CLB structure and local routing etc. is very similar
![Page 27: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/27.jpg)
155155
Commercial Devices- I
• So, why are there fine and course grained devices ?
• Depends on the target application
• Our fine-grained device has a high overhead in terms ofrouting– CLB’s only have 1 logic function and require lots of routing
between CLB’s
• Often common to include lots of combinational logicwithin a single CLB– Use RAM based look-up-tables (LUT’s) to implement logic
![Page 28: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/28.jpg)
156156
Commercial Devices- II
• Course grained device example- Xilinx 4000 series
![Page 29: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/29.jpg)
157157
Conclusion
• Provided introduction to advanced programmable logicdevices
• Derived a fine-grained device from first principles
• Touched on some commercial devices
• The future– Devices already in design/ production offering > 1 Million
equivalent gates
– Reconfigurable computing- custom processor using FPGAconnected to normal CPU to accelerate computationallyintensive tasks
![Page 30: Programmable Logic Devices - University of Glasgowuserweb.eng.gla.ac.uk/scott.roy/DCD3/06_Programmable_Logic.pdf · • To give an introduction into Programmable Logic Devices in](https://reader030.vdocuments.mx/reader030/viewer/2022040305/5eaaaa5412542b0c6b14fe73/html5/thumbnails/30.jpg)
158158