Sunteți pe pagina 1din 30

1

Digital System Design with PLDs and FPGAs


Kuruvilla Varghese
DESE
Indian Institute of Science
Kuruvilla Varghese

Your Idea or Expectation

What is your idea of this course?


Why are you learning this course?
What do you think should be taught?

Kuruvilla Varghese

Course Objective

Digital Systems Design

Specifications to Implementation
Algorithm to Architecture (Front end design)
Partitioning, Design of blocks, Timing Analysis
Device Technology: PLD, FPGA
Design entry: VHDL
Case studies (Communications, Embedded Systems,
Computer Architecture)
Kuruvilla Varghese

Pre-requisite

Digital Systems

Boolean Algebra, Minimization


Gates, Combinational Logic
Flip-flops, Registers, Counters
Timing
CMOS circuits

Basics of Micro-processors
Basics of Computer Architecture
Basics of Communication Networks
Kuruvilla Varghese

Course Contents

Advanced Digital Design


Top-down Design, Data path, Controllers, Timing,

Programmable Logic Devices (PLDs)


Architecture, Applications, Optimal Design,

Field Programmable Gate Arrays (FPGAs)


Architecture, Applications, Optimal Design,

VHDL (VHSIC-Hardware Description Language)


VHDL for Synthesis

Case Studies
Kuruvilla Varghese

At the end of the course

System Level
Given a set of specifications for a digital system,
you will be able to design the system meeting the
specifications.
In particular, given an algorithm you will be able
to design the datapath and the controller(s) to
implement the functionality.
Kuruvilla Varghese

At the end of the course

Digital Systems
You will be able to design the datapath using
higher level combinational and sequential blocks.
You will be able to solve the functional and timing
problems in the datapath.
You will be able to resolve various issues related
to the controller design.
You will be able to resolve synchronization issues.
Kuruvilla Varghese

At the end of the course

VHDL
You will be able to write a VHDL code to implement a
particular design/block.
You will be able to analyze a VHDL code and infer what
circuit a synthesis tool might generate out of a code.
You will know how the VHDL simulation tool simulates the
code.
You will be able to write test benches to automate the
verification process.
Kuruvilla Varghese

At the end of the course

PLDs
You will be able to choose a particular PLD for a
particular application.
You will be able to design and code to exploit the
architectural features of PLD

Kuruvilla Varghese

At the end of the course

10

FPGAs
You will be able to choose a particular FPGA for a
particular application.
You will be able to use FPGAs in your design,
meeting the area and delay constraints and estimate
the power consumption.
You will be able to design and code to exploit the
architectural features of FPGA.
Kuruvilla Varghese

Exercises

11

Suggest Exercises for you to work


Exercises covers various aspects covered in course,
deal with concepts
Mini Project
Use PLD, FPGA Free Tools from Xilinx, Altera,
Atmel, Lattice etc.
If possible, try to work on PLD/FPGA kits
Kuruvilla Varghese

References

12

John F Wakerly, Digital Design: Principles and


Practices, Prentice Hall
Kevin Skahil, VHDL For Programmable Logic,
Addison Wesley.
Zainalabedin Navabi, VHDL. Analysis and
Modelling of Digital Systems, McGraw-Hill
Neil H E Weste, David Harris, Ayan Banerjee,
CMOS VLSI Design, Pearson Education.
Papers, FPGA Data sheets
Kuruvilla Varghese

13

Digital System Design with PLDs and FPGAs


Overview
Kuruvilla Varghese
DESE
Indian Institute of Science
Kuruvilla Varghese

Hierarchy

14

Learning
Bottom up
Transistor => Gates => Combinational => Sequential =>
Computing Blocks/Controllers => System

Design

Top down
Processor => ALU, Reg, =>
ALU => Adder, Sub
Adder => Gates => Transistors
Kuruvilla Varghese

Learning: Level 0 - MOS Transistors

15

Kuruvilla Varghese

Learning: Level 1 - Gates

16
A

Kuruvilla Varghese

Learning: Level 2 - Full Adder


A
0
0
0
0
1
1
1
1

17

B
0
0
1
1
0
0
1
1

Cin
0
1
0
1
0
1
0
1

S
0
1
1
0
1
0
0
1

Co
0
0
0
1
0
1
1
1

Kuruvilla Varghese

Learning: Level 3 - Adder

18

Kuruvilla Varghese

Learning: Level 4 - Multiplier

19

Kuruvilla Varghese

Design: Top Down

20

Level 0

Level 2

Level 1

Level 3

Level 4

Kuruvilla Varghese

10

Digital Design: Major Constituents

21

Function / Logic
Combinational
Boolean Algebra, Minimization, Functions, Gates,
Encoders, Decoders, Multiplexers, Demultiplexers,
Parity circuits, Comparators, Priority encoders, Opendrain outputs, and Tri-state outputs, Schmitt-trigger
inputs, Adders, Subtractors, Incrementer, Decrementer,

Kuruvilla Varghese

Major Constituents: Functionality / Logic

22

Sequential

Flip-Flops, Latches
Counters, Registers, Shift Registers
Finite State Machines (FSM)
ROM, EPROM, EEPROM
SRAM, SSRAM
DRAM, SDRAM
FIFO
CAM
Kuruvilla Varghese

11

Minimization

23

Karnaugh Maps
Graphical tool, for humas

Quine-McCluskey (QM)
Minimal solution, Complexity

Espresso
Heuristic based on QM, Faster
Near minimal solution
Kuruvilla Varghese

Minimization

24

Multi-Level minimization
Decomposition (in to multiple terms)
Extraction of common sub-expressions of multiple
outputs
Factoring
Substitution
Flattening
Kuruvilla Varghese

12

Functions and Gates: AND


A

1
1

0
1

0
1

25

A, B and Y Active High


A
B

A, B and Y Active Low


A
B
Y=AB
Y/ = A/ + B/

De Morgans Theorem

Kuruvilla Varghese

Functions and Gates: AND

26

AND Gate AND, and OR Functions

Kuruvilla Varghese

13

Functions and Gates: NAND


A
0
0
1
1
A
0
0
1
1

B
0
1
0
1
B
0
1
0
1

Y
1
1
1
0
Y
1
1
1
0

27

A, B Active High and


Y Active Low - AND
A
B

A, B Active Low, Y Active High


- OR
A
B

Kuruvilla Varghese

Functions and Gates: NAND


A
0
0
1
1

B
0
1
0
1

Y
1
1
1
0

28

Invert
A

NAND Universal Gate


AND, OR and Invert functions

NAND Gate AND, OR, and Invert Functions


AND Gate AND and OR Functions
NOR Gate AND, OR, and Invert Functions
OR Gate AND and OR Functions
Kuruvilla Varghese

14

Functions and Gates

29

AND - OR

NAND - NAND

Kuruvilla Varghese

Functions and Gates

30

Y = (A/ + B/) C/
A
B
Y
C

A
B
Y

Kuruvilla Varghese

15

Encoder

31

In a binary encoder, distinct inputs are coded in to binary


outputs (e.g. 8 inputs are encoded to 3 binary bits).
Implementation uses OR gates
When we assign priority to inputs, then the encoder is
called priority encoder
I0
I1

O2
O1
O0

I7
Kuruvilla Varghese

Encoder

32

An encoder can encode some input code to another


code but, the number of output bits will be less
than input bits

Kuruvilla Varghese

16

Decoder

33

In a binary decoder, binary inputs are decoded to produce


distinct outputs (e.g. 3 bit binary number is decoded to
produce 8 distinct outputs). Implementation uses AND gates
A general decoder can convert a code to another code and
number of bits in input will be less than the number of bits
in the output
O0
O1
I2
I1
I0
O7
Kuruvilla Varghese

Tri-State Gates
EN
Y

34
0, 1, Z (High Impedance)
Multiplexing
Buses

EN/
A

EN

Kuruvilla Varghese

17

Multiplexer

35
0 1 2 3

A
B
C
D

sel

4 to 1 Mux (1 bit), 4 AND gates of 1+2 inputs, an OR gate


of 4 inputs
2n to 1 Mux (1 bit), 2n AND gates of 1+n inputs, and an OR
gate of 2n inputs
Kuruvilla Varghese

De-Multiplexer

3 2 1 0

36

W
X
Y
Z

sel

1 to 4 De-Mux (1 bit), 4 AND gates of 1+2 inputs


1 to 2n De-Mux (1 bit), 2n AND gates of 1+n inputs

Kuruvilla Varghese

18

Multiplexer / De-multiplexer
A
B
C
D

3 2 1 0

0 1 2 3

A
B
C
D

37

sel

sel

Text book Picture


Real Systems
May not be symmetrical or ordered
You may not see a explicit de-multiplexers
Kuruvilla Varghese

Latch / Flip Flop


Latch
D

38
Flip-Flop

CK

CK

D
CLK
QL
QD

Kuruvilla Varghese

19

Major Constituents: Timing

39

Combinational Circuits
tpd: Propagation delay
tPLH: tpd when output switches from L to H
tPHL: tpd when output switches from H to L

Kuruvilla Varghese

Flip-Flop Timing
D

40
ts: Setup time: Minimum time
input must be valid before the
active clock edge

CK

th: Hold time: Minimum time


input must be valid after the
active clock edge

CLK
D

ts

tco: Propagation delay for


input to appear at the output
from active
clock edge

th

tco
Kuruvilla Varghese

20

Major Constituents: Timing


5 ns

5 ns

5 ns

41
5 ns
Y

Static-0 Hazard
A
B

Static-1 Hazard
OR Gate
A: 1 0

Y
50

55

60

65

70

t ns

Model

Kuruvilla Varghese

Timing: Static-0 Hazard Real Life

42

Interconnect / Logic delay


A
Y

B
C

C: 1, B: 0

1, A: 1

Unbalanced path delay, Switching / glitches at Y


May not be problem in synchronous sequential circuits
Power dissipation
Kuruvilla Varghese

21

Dynamic Hazard

43

10 ns

Y 0

5 ns
Z 1

X 1

5 ns

A
X
Y
Z
45

50

55

60

t ns

65

Kuruvilla Varghese

Electrical Characteristics

44

Voltages, Currents, Power dissipation


VOH, VOL, IOH, IOL
VIH, VIL, IIH, IIL
VOH = VDD IOH * RON
VDD
IOH

VOHmin @ IOHmax
VOL = IOL * RON

IOL

VOLmax @ IOLmax
Kuruvilla Varghese

22

Electrical Characteristics

VOHmin
VIHmin

NMH

45

Fanout
Min (IOHmax /IIHmax ,
IOLmax/IILmax)

VILmax
VOLmax

NML

Power Dissipation
PD = C * V2DD * f

Kuruvilla Varghese

Low Power Design

46

PD = C * V2DD * f

Transistor Level (Feature size)


Circuit Level (e.g. Balanced Path delay)
System level (Power down, Clock freeze)
Architecture
Algorithms
Kuruvilla Varghese

23

High Frequency Designs

47

Transmission Lines
Reflections
Cross talk
Ground loops
Back end Tools

Kuruvilla Varghese

Device Technology

48

Full Custom (ASIC)

High NRE Cost, High Volume


Large Turn around time
Custom design from scratch
Use of library cells

Semi Custom (Mask Programmable / Standard Cell)


Design in terms of standard blocks
Medium NRE Cost, Medium Volume
Medium Turn around time
Kuruvilla Varghese

24

Device Technology

49

Field Programmable (FPGA)


Low NRE Cost, Low-Medium Volume
Low Turn around time

Kuruvilla Varghese

VLSI Technology

50

PMOS is getting faster (hole mobility)


Strained silicon
Current Feature Size 22 nm (Intel Core i3, i5, i7)
Future Feature Size 14 nm
Inverter Delay
5-7 ps

Kuruvilla Varghese

25

Design Methodology

51

Front-end design
Specifications => Gate and Flip-flop Net list
Algorithm => Architecture => Circuit

Back-end design
Gate and Flip-flop Net list => Chip Masks
Circuit => Transistor Level Circuit => Chip masks
Circuit => Configuration pattern (FPGA)

Kuruvilla Varghese

Design Methodology

52

Data Path (Registers, Combinational)


Controller(s) (FSMs)
Metric, Constraints: Area, Delay, Power

Kuruvilla Varghese

26

Sequential Circuits: Data Path

FF

Comb

53

FF

Kuruvilla Varghese

Controller: Finite State Machine

Next
State
Inputs

NSL

54

Present
State

FF

OL

Outputs

Kuruvilla Varghese

27

System on Chip / Intellectual Property


System on Board

55

System on Chip

Embedded System on Chip


Reduced power dissipation
Reduced chip interconnects
Reduced device size

Programmable System on Chip


ASIC Domain

FPGA Domain
Kuruvilla Varghese

SoC (Typical)

56

One ore more processor cores


Control, Communication, DSP

Number of peripherals
Timer, I/Os, Memory controllers, UART, USB,

On-Chip Bus Architecture


Network Interfaces
Custom Hardware
Codec's, Packet processing, Signal processing etc.
Firmware
RTOS, Protocol stacks, Application software
Kuruvilla Varghese

28

Intellectual Property (Digital Hardware)

57

Soft IP
HDL Design

Firm IP
Synthesized Circuit

Hard IP
Place and Routed IP

Kuruvilla Varghese

Dynamic / Runtime Reconfiguration

58

FPGA / ASIC
A part of the Device is reprogrammed to implement a
different functionality
Other part may or may not be used
Saves area, power and achieve lower delay
Reconfiguration time is important
Granularity is important
Flexibility is important
Kuruvilla Varghese

29

System Modeling

59

Architecture Exploration, Performance Modeling, High


level Synthesis
Hardware-Software partitioning
Cost-performance trade-offs
Hardware: Concurrent, Higher performance, Higher cost
Software: Sequential, Lower performance, More flexible
SystemC
SystemVerilog: Verification
Kuruvilla Varghese

Application Areas

60

Communication Networks
Physical layer (Mixed-mode design)
Data link layer (Digital, Mostly in hardware, control in OS
Drivers)
Network layer (Processing in Hardware for Network elements
like Switches and Routers)

Signal Processing
Filters, Codecs, Compression, etc.

Computer Architecture
Kuruvilla Varghese

30

S-ar putea să vă placă și