You are on page 1of 41

www.dkoplabs.

com

Course Curriculum
FPGA/CPLD BASICS
Part I & Part II

1
FPGA Basics
www.dkoplabs.com

FPGA/CPLD BASICS – PART 1

Introducton to FPGA
FPGA Architecture
FPGA Working
CPLD
CPLD Architecture

FPGA Basics 2
www.dkoplabs.com

FPGA/CPLD BASICS
Who should use FPGA /CPLD
• Students & Researchers
• Industry professionals
• Amateur designers
Why use FPGA/CPLD (ADVANTAGES)
• Re-Programmable
• Quick Design Implementaton
• Cheap (ASICs are cheaper if produced in bulk)
• Flexible & afordable
• Small Design over-head
• FUN to design with and use

FPGA Basics 3
www.dkoplabs.com

FPGA/CPLD BASICS
Where FPGA /CPLD can be used
• Embedded
• Defense, Research and Aerospace
• Biomedical Applicatons
• Automobiles
• Small Projects
• Communicaton
Prerequisites for using FPGAs
• Verilog HDL or VHDL
• Digital Design Basics

FPGA Basics 4
www.dkoplabs.com

FPGA/CPLD BASICS
Slides Organizaton:

Session 1 – FPGA

Session 2 – CPLD

FPGA Basics 5
www.dkoplabs.com

FPGA BASICS

Session 1

FPGA
Field Programmable Gate Array

FPGA Basics 6
www.dkoplabs.com

FPGA BASICS
• Idea Behind FPGA
select

0
1
1
0 MUX
1 FF
0
0
Simplifed view 1
Programmable
Memory

FPGA Basics 7
www.dkoplabs.com

FPGA BASICS
• Idea Behind FPGA
• the output functonality is stored in LUT
• the Multplexor selects LUT output
• another multplexor selects the output to be
combinatorial or sequental

• Distributed memory elements store the interconnect


confguraton informaton
• This confguraton controls the interconnects among
wires and the confgurable logic/arithmetc blocks

FPGA Basics 8
www.dkoplabs.com

FPGA BASICS
• FPGA Internal Architecture View(General)

FPGA Basics 9
www.dkoplabs.com

FPGA BASICS
• Inside FPGA

• Basic Components
• LUT (look-up-table)
• Flip-Flops
• Multplexors
• I/O Blocks
• Programmable switch matrices
• Interconnect
• Clocks

FPGA Basics 10
www.dkoplabs.com

FPGA BASICS
• Xilinx - Logic/Arithmetc Consttuton

FPGA Basics 11
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA Internal View

FPGA Basics 12
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA CLB (Confgurable Logic Block)

FPGA Basics 13
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA - CLB inside, the pair of slices

FPGA Basics 14
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA - CLB Detailed view

FPGA Basics 15
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA - CLB I/O connectons

FPGA Basics 16
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA -CLB I/O connecton detailed

FPGA Basics 17
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA - Switch Matrix
programmable switch
element

turning the corner, etc.

FPGA Basics 18
www.dkoplabs.com

FPGA BASICS
• Xilinx FPGA - I/O block

FPGA Basics 19
www.dkoplabs.com

FPGA BASICS
• Example - LUT – Luck-Up Table
The functon is stored in RAM like a Truth Table

LUT for Sum: Adder Truth Table

input[0:2] 0 MUX confg_out


1
1
0
1 output
0
clock 0
1
confg_in

FPGA Basics 20
www.dkoplabs.com

FPGA BASICS
• Example - Modulo-4 Counter

Logic
State Diagram Implementaton

FPGA Basics 21
www.dkoplabs.com

FPGA BASICS
Xilinx FPGA - CLB inside, the pair of slices

FPGA Basics 22
www.dkoplabs.com

FPGA BASICS
• FPGA Selecton

FPGA Basics 23
www.dkoplabs.com

FPGA BASICS
• Variatons
Xilinx Spartan II Altera Stratx

FPGA Basics 24
www.dkoplabs.com

CPLD BASICS

Session 2

CPLD
Complex Programmable Logic Device

FPGA Basics 25
www.dkoplabs.com

CPLD BASICS
• CPLD Architecture - General Internal View
Altera MAX CPLD
I/O Cell
LAB (Logic Array Block)

LAB LAB
LA

•••
LAB LAB (local
array)
LAB LAB

Macroccell
Chip-wide
interconnect Each LAB contains
16 macro-cells

FPGA Basics 26
www.dkoplabs.com

CPLD BASICS
• Xilinx CPLD architecture

FPGA Basics 27
www.dkoplabs.com

CPLD BASICS
• Functonal Architecture
90 product terms
5 per macro-cell
Product-term allocators

FPGA Basics 28
www.dkoplabs.com

CPLD BASICS
• CPLD Macro-cell

FPGA Basics 29
www.dkoplabs.com

CPLD BASICS
• CPLD I/O block

FPGA Basics 30
www.dkoplabs.com

CPLD BASICS
• CPLD Selecton Comparison

FPGA Basics 31
www.dkoplabs.com

FPGA/CPLD BASICS
• FPGA v/s CPLD
FPGA CPLD
1. FPGAs can be used in various 1. Implement random glue logics
applicatons: prototyping, or Replace circuits previously
FPGA-based computers, on-site implemented by multple SPLDs
hardware re-confguraton, DSP,
logic emulaton, network 2. Circuits that can exploit wide
components, etc. AND/OR gates, and do not need

Gate Count 10,000 ~ 10,00,000 a very large number of fip-fops


and above
are good candidates for
implementaton in CPLDs.

Gate Count 200 ~ 12,000

FPGA Basics 32
www.dkoplabs.com

FPGA/MC BASICS
• FPGA v/s Microcontroller
Micro-controller FPGA
Meant to perform only control Can perform virtually any digital
routnes for other h/w logic/arithmetc operaton, even a
uController or uProcessor
Well defned hardware and Operaton is hardware
connecton reconfgurable

Less fexible and can normally Although rest of the hardware is


perform one type of functon at a somewhat well defned but
tme. connectons are not well-defned.

FPGA Basics 33
www.dkoplabs.com

FPGA/MC BASICS
• FPGA v/s Microcontroller ….
Micro-controller FPGA
Operaton is based on instructons More fexible and can be
and the instructons are executed confgured so that diferent blocks
one afer the other perform diferent functons
Generally, moderately fast Generally, very fast.

Consumes less power Consumes comparatvely more power

Are readily available for many Development tme is quite long


applicatons so the tme for
development is very short

FPGA Basics 34
www.dkoplabs.com

FPGA/ASIC BASICS
• FPGA v/s ASIC ….
ASIC FPGA
Highly efcient in terms of area- Less efcient in terms of area-
power-performance power-performance
High cost when NOT produced in bulk. Cost could be high if compared with
Cost can be signifcantly less if made in bulk ASIC producton.
Very large quanttes. Otherwise, it is cheaper.
Can not be re-programmed Re-programmable:
100,000 tmes for the fash memory
1 million tmes for nand FPGA without
error correcton.
More than 1 million tmes for nor FPGA

without error correcton.

FPGA Basics 35
www.dkoplabs.com

FPGA/ASIC BASICS
• FPGA v/s ASIC ….
ASIC FPGA
Highly efcient in terms of area- Less efcient in terms of area-
power-performance power-performance
High cost when NOT produced in bulk. Cost could be high if compared with
Cost can be signifcantly less if made in bulk ASIC producton.
Very large quanttes. Otherwise, it is cheaper.
Can not be re-programmed Re-programmable:
100,000 tmes for the fash memory
1 million tmes for nand FPGA without
error correcton.
More than 1 million tmes for nor FPGA
without error correcton.

FPGA Basics 36
www.dkoplabs.com

FPGA/ASIC BASICS
• FPGAs/ASIC
Cost

FPGA FPGA FPGA


Cost Advantage
Cost Cost Advantage
Advantage ASIC Cost
ASICAdvantage
Cost Advantage
Production Volume

FPGA Basics 37
www.dkoplabs.com

FPGA BASICS
• FPGAs Evoluton - What has happened

• In the beginning FPGAs were mere logic gates, multplexers and


reconfgurable interconnects.

• Over tme, numerous additons has made it a heavy-weight on


steroids.
-Dedicated Memories & clock management
-Hard Cores
-I/O blocks
-Dedicated Signal Processing Cores
-Advanced CMOS manufacturing

• And now, we have FPGA chips in market performing at par with


ASICs

FPGA Basics 38
www.dkoplabs.com

FPGA/CPLD BASICS
• FPGAs Future

• FPGA CPUs – Acrhonic Intel Confgurable Atom processor!


• Massive arrays of FPGAs to implement supercomputers
• FPGAs for reconfgurable GPUs
• Large Embedded Systems
• Reconfgurable network felds

FPGA Basics 39
www.dkoplabs.com

References
• Some graphics from “ELEC 311 Digital Logic and Circuits”
ppt’s, Dr. Ron Hayne The Citadel Department of Electrical
and Computer Engineering.
• “FPGA Architecture: Survey and Challenges” by Ian Kuon,
Russell Tessier, and Jonathan Rose, now Publishers Inc.

Books

FPGA Basics 40
www.dkoplabs.com

Disclaimer

All the copyrighted graphics are the property of their legal owners.

Some graphics from The Citadel Department of Electrical and Computer


Engineering.

Other images Courtesy, John F. Wakerly and Prentiee-all

FPGA Basics 41

You might also like