+ All Categories
Home > Documents > Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7...

Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7...

Date post: 08-Jul-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
44
Chapter 7 Chapter 7 Designing Sequential Designing Sequential Logic Circuits Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2: 5/30/03 2.1: 12/24/03
Transcript
Page 1: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Chapter 7Chapter 7

Designing SequentialDesigning SequentialLogic CircuitsLogic Circuits

Rev 1.0: 05/11/031.1: 5/23/031.2: 5/30/032.1: 12/24/03

Page 2: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Sequential LogicSequential Logic(1) Finite State

Machine (FSM)(2) Pipelined System

2 storage mechanisms:

- Positive feedback (SRAM)

- Charge-based (DRAM)

Page 3: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Naming ConventionsNaming Conventions

In our textbook:a latch is Level-sensitive flip-flopa register is Edge-triggered flip-flop

There are many different naming conventions

For instance, many books call Edge-triggered elements flip-flops (asynchronous JK, SR) This leads to confusion

Page 4: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Latch v.s. RegisterLatch v.s. RegisterLatchstores data when clock is low (or high)

D

Clk

Q D

Clk

Q

Registerstores data when clock rises (on edges)

Clk Clk

D D

Q Q

Page 5: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

LatchesLatches

In

clk

In

Out

Positive Latch

CLK

DG

Q

Out

Outstable

Outfollows In

In

clk

In

Out

Negative Latch

CLK

DG

Q

Out

Outstable

Outfollows In

transparenthold

holdhold

transparent transparent

Page 6: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Timing DefinitionsTiming Definitions

t

CLK

t

D

tc - q

tholdtsu

t

Q DATASTABLE

DATASTABLE

Register

CLK

D Q

• Setup time (T_su): the time before the clock edge that the D input has to be stable

• Hold time (T_hold): the time after tue clock edge that the D input has to main stable

• Clock-to-Q delay (Tc-q): the delay from the positive clock input to the new value of the Q output.

Page 7: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Characterizing TimingCharacterizing Timing

Clk

D Q

tC -Q

Clk

D Q

tC -Q

tD -Q

Register Latch

Page 8: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Maximum Clock FrequencyMaximum Clock Frequency

FF’s

LOGIC

tp,comb

φ

Also:Tcd,reg + tcd,logic >= thold

tcd: Contamination Delay = Minimum delay of the function

tclk-Q + tp,comb + tsetup <= T

CLK

T

tclk-Q + tp,comb + tsetup

Page 9: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

MuxMux--Based LatchesBased LatchesNegative latch(transparent when CLK= 0)

Positive latch(transparent when CLK= 1)

CLK

1

0D

Q 0

CLK

1D

Q

InClkQClkQ ⋅+⋅= InClkQClkQ ⋅+⋅=

Page 10: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

MuxMux--based Latch (TG)based Latch (TG)

CLK

CLK

CLK

D

Q

Page 11: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

MuxMux--based Latch (NMOS)based Latch (NMOS)

CLK

CLK

CLK

CLK

QM

QM

NMOS only Non-overlapping clocks

Page 12: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Writing into a Static LatchWriting into a Static Latch

CLK

CLK

CLK

D

Q D

CLK

CLK

D

Converting into a MUXForcing the state(can implement as NMOS-only)

Use the clock as a decoupling signal, that distinguishes between the transparent and opaque states

Page 13: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

MasterMaster--Slave (EdgeSlave (Edge--Triggered) RegisterTriggered) Register

1

0D

CLK

QM

Master

0

1

CLK

Q

Slave

QM

Q

D

CLK

Two opposite latches trigger on edgeAlso called “master-slave latch Pair “

Negative Latch Positive Latch Master Slave

Page 14: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

MasterMaster--Slave RegisterSlave RegisterMultiplexer-based latch pair

Q M

Q

D

CLK

T 2I2

T 1I1

I3 T 4I5

T 3I4

I6I5

INVpdTXpdQC

Hold

TXpdINVpdSU

TTITTT

TTIITIT

,,63

,,2311

0

3

+=+==

+×=+++=

Page 15: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Setup Time of MSSetup Time of MS--RegisterRegister

D

Q

QM

CLK

I2 2 T2

2 0.5

Vol

ts

0.0

0.2 0.4time (nsec)

(a) Tsetup 5 0.21 nsec

0.6 0.8 10

0.5

1.0

1.5

2.0

2.5

3.0

DQ

QM

CLK

I2 2 T2

2 0.5V

olts

0.0

0.2 0.4time (nsec)

(b) Tsetup 5 0.20 nsec

0.6 0.8 10

0.5

1.0

1.5

2.0

2.5

3.0

•I2-T2 : I2 output to T2•Check input of T2 and output of T2 are the same

Page 16: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

ClkClk--Q DelayQ Delay

D

Q

CLK

2 0.5

0.5

1.5

2.5

tc - q(lh)

0.5 1 1.5 2 2.50time, nsec

V o l t s tc - q(hl)

Page 17: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Reduced Clock Load (only 4 CLK load)Reduced Clock Load (only 4 CLK load)MasterMaster--Slave PositiveSlave Positive--edge Registeredge Register

D QT1 I 1

CLK

CLK

T2

CLK

CLKI2

I 3

I4

c.f: 8 Clock loads in conventional Mater-Slave Register Design

Page 18: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Avoiding Clock OverlapAvoiding Clock OverlapCLK

CLK

AB

(a) Schematic diagram

(b) Overlapping clock pairs

X

D

Q

CLK

CLK

CLK

CLK

Page 19: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

SR FlipSR Flip--Flop: CrossFlop: Cross--Coupled PairsCoupled Pairs

Forbidden State

QRS Q

Q00 Q

101 0

010 1011 0

S Q

R Q

Cross-coupled NORs

S

R

Q

Q

NOR-based Set-Reset

Flop-Flop

S

QR

Q

Cross-coupled NANDs

Page 20: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Clocked NORClocked NOR--based SR Flipbased SR Flip--FlopFlop

M1

M2

M3

M4

Q

M5S

M6CLK

M7 R

M8 CLK

VDD

Q

Added Clock Control

This asynchronous SR FFis NOT used in datapaths any more,but is a basic building memory cell

S Q

R Q

Cross-coupled NORs

Page 21: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Sizing IssuesSizing Issues

Output voltage dependenceon transistor width

Transient response

4.03.53.0W/L5 and 6

(a)

2.52.00.0

0.5

1.0

1.5

2.0

Q (V

olts

)

time (ns)

(b)

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

1

2

W = 1 mµ

3

Volts

Q S

W = 0.9 mµW = 0.8 mµ

W = 0.7 mµW = 0.6 mµ

W = 0.5 mµ

Page 22: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Storage MechanismsStorage Mechanisms

D

CLK

CLK

Q

Dynamic (charge-based)CLK

CLK

CLK

D

Q

Static

C1/C2: Gate cap, DiffusionCap, and Gate-drain couplingcapacitance

Page 23: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Clock OverlapClock OverlapT0-0: T1 and T2 on

Race ConditionNode B cannot be overwritten

by passed D value

Page 24: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Making a Dynamic Latch PseudoMaking a Dynamic Latch Pseudo--StaticStatic

D

CLK

CLK

D

Adding a weak feedback inverter (keeper)

Page 25: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Clocked CMOS (CClocked CMOS (C22MOS)MOS)

M1

D Q

M3CLK

M4

M2

CLK

VDD

CL1

X

CL2

Master Stage

M5

M7CLK

CLK M8

M6

VDD

Slave Stage

“Keepers” can be added to make circuit pseudo-static

New Value of invertedCL1

Previous value stored in CL2

OutputQ

EvaluateHigh-impedance: Hold

Slave

HoldEvaluateMaster

10Clock

Page 26: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Insensitive to ClockInsensitive to Clock--OverlapOverlap

M1

D Q

M4

M2

0 0

VDD

X

M5

M8

M6

VDD

(a) (0-0) overlap

M3

M1

D Q

M2

1

VDD

X

M71

M5

M6

VDD

(b) (1-1) overlap

Will fail in slow rise/fall time of CLOCK Signal!

Page 27: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

True SingleTrue Single--Phase Clocked Register (TSPC)Phase Clocked Register (TSPC)

CLKIn

VDD

CLK

VDD

In

Out

CLK

VDD

CLK

VDD

Out

Negative latch(transparent when CLK= 0)

Positive latch(transparent when CLK= 1)

A register can be constructed by cascading Positive and Negative Latches 12 transistors are used!

Page 28: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Positive EdgePositive Edge--triggered Register in TSPCtriggered Register in TSPC

CLK

CLK

D

VDD

M3

M2

M1

CLK

Y

VDD

Q

Q

M9

M8

M7

CLK

X

VDD

M6

M5

M4

(a) (b) (c)

CLK=0: (a) Latch D value, (b) Precharge, (c) Open/HoldCLK=1: (a) Open, (b) Evaluate, (c) Update Q value

Page 29: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

TSPCTSPC--based Positive Edgebased Positive Edge--Triggered DFFTriggered DFF

From Referenced Textbooks: [1] “CMOS Integrated Circuits: Analysis and Design,” 3rd Ed., by Sung-Mo Kang and Yusuf Leblebici, McGraw-Hill, 2003.

Page 30: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Pipelined Systems using Dynamic Pipelined Systems using Dynamic CMOS CircuitsCMOS Circuits

Page 31: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

PipeliningPipeliningRE

GRE

G

REGlog

a

CLK

CLK

CLK

Out

b

REG

REG

REGlog

a

CLK

CLK

CLK

REG

CLK

REG

CLK

Out

b

Reference Pipelined

T_(non-pipe) = 3 x T_(pipeline)

Page 32: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

PipeliningPipelining

)(pipelined),,max(pipeline)(non

sulogpd,abspd,addpd,qcmin,

sulogicpd,qcmin

tttttT

tttT

pipe ++=

−++=

At the expense of “Latency (input-to-output delay)”

Not good for interactive communications

Page 33: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Dynamic LatchDynamic Latch--based Pipelinebased Pipeline

F G

CLK

CLK

In Out

C1 C2

CLK

C3

CLK

CLK

Compute F compute G

Be carefulof Race!

Page 34: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

C2MOS LatchC2MOS Latch--based Pipelinebased Pipeline

Race-free as long as function F (implemented by static logic) between the Latches are Non-inverting!

Page 35: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Potential Race Condition Potential Race Condition during 0during 0--00

Page 36: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Review of NPReview of NP--Domino Logic Domino Logic (NORA CMOS Logic)(NORA CMOS Logic)

Page 37: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

NPNP--Domino Logic ExampleDomino Logic Example

ab

c d e

out

edcabdedcbaOut ++=+⋅+⋅= )(

Page 38: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

NORA CMOS NORA CMOS

(a) Evaluation at Phi=1(b) Evaluation at Phi=0(c) Pipelined NORA CMOS

system

Page 39: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Example of NORAExample of NORA--CMOSCMOS

CLK Module

Need alternative CLK and CLK Modules

Page 40: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Example of NORAExample of NORA--CMOS CMOS NOR2 + INV = OR2

Combine dynamic CMOS and Static CMOS!

Page 41: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Review of TSPC RegisterReview of TSPC Register

CLKIn

VDD

CLK

VDD

In

Out

CLK

VDD

CLK

VDD

Out

Negative latch(transparent when CLK= 0)

Positive latch(transparent when CLK= 1)

A register can be constructed by cascading Positive and Negative Latches 12 transistors are used!

Page 42: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Including Logic in TSPC Including Logic in TSPC

CLKIn CLK

VDDVDD

QPUN

PDN

CLK

VDD

Q

CLK

VDD

In1

In1 In2

In2

AND latchExample: logic inside the latch

Used in High-performance CPU (DEC Alpha) designs!

Page 43: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

Pipelined TSPC CMOS SystemPipelined TSPC CMOS System

(a) Compared with NORA CMOS, we need two extra transistors per stage. But we can operate at a true singe-phase clock signal.

(b) Very attractive from system-design point of view.

Page 44: Designing Sequential Logic Circuitsaccess.ee.ntu.edu.tw/course/VLSI_design_92first/ppt/chapter7 12-24 … · Designing Sequential Logic Circuits Rev 1.0: 05/11/03 1.1: 5/23/03 1.2:

SummarySummarySequential/pipelined circuits need good latches and registers for speed performance.

Dynamic circuits can realize the pipelined system in a very efficient and compact way. But it should be designed with extreme care.

Current trend is NOT to use dynamic CMOS for normal-speed operations in large-scaled designs

dynamic CMOS is not good for re-design, maintain, and verification.


Recommended