lecture 11: sequential circuit design

108
Lecture 11: Sequential Circuit Design

Upload: kamal

Post on 24-Jan-2016

52 views

Category:

Documents


4 download

DESCRIPTION

Lecture 11: Sequential Circuit Design. Outline. Sequencing Sequencing Element Design Max and Min-Delay Clock Skew Time Borrowing Two-Phase Clocking. Sequential Logic. Sequencing. Combinational logic output depends on current inputs Sequential logic - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Lecture 11:  Sequential Circuit Design

Lecture 11:

Sequential Circuit Design

Page 2: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 2

Outline Sequencing Sequencing Element Design Max and Min-Delay Clock Skew Time Borrowing Two-Phase Clocking

Page 3: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Sequential Logic

11: Sequential Circuits 3

Page 4: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 4

Sequencing Combinational logic

– output depends on current inputs Sequential logic

– output depends on current and previous inputs– Requires separating previous, current, future– Called state or tokens– Ex: FSM, pipeline

CL

clk

in out

clk clk clk

CL CL

PipelineFinite State Machine

Page 5: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 5

Sequencing Cont. If tokens moved through pipeline at constant speed,

no sequencing elements would be necessary Ex: fiber-optic cable

– Light pulses (tokens) are sent down cable– Next pulse sent before first reaches end of cable– No need for hardware to separate pulses– But dispersion sets min time between pulses

This is called wave pipelining in circuits In most circuits, dispersion is high

– Delay fast tokens so they don’t catch slow ones.

Page 6: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 6

Sequencing Overhead Use flip-flops to delay fast tokens so they move

through exactly one stage each cycle. Inevitably adds some delay to the slow tokens Makes circuit slower than just the logic delay

– Called sequencing overhead Some people call this clocking overhead

– But it applies to asynchronous circuits too– Inevitable side effect of maintaining sequence

Page 7: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 7

Sequencing Elements Latch: Level sensitive

– a.k.a. transparent latch, D latch Flip-flop (or Register): edge triggered

– A.k.a. master-slave flip-flop, D flip-flop, D register Timing Diagrams

– Transparent– Opaque– Edge-trigger

D

Flo

p

Latc

h

Q

clk clk

D Q

clk

D

Q (latch)

Q (flop)

D

Flo

p

Latc

h

Q

clk clk

D Q

clk

D

Q (latch)

Q (flop)

Page 8: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Latch versus Register Latch

stores data when clock is low

D

Clk

Q D

Clk

Q

Register

stores data when clock rises

Clk Clk

D D

Q Q

Page 9: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Latches

11: Sequential Circuits 9

Page 10: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Timing Definitions

t

CLK

t

D

tc 2 q

tholdtsu

t

Q DATASTABLE

DATASTABLE

Register

CLK

D Q

Page 11: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Timing

11: Sequential Circuits 11

Page 12: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 12

Latch Design Pass Transistor Latch Pros

+ Tiny+ Low clock load

Cons– Vt drop– nonrestoring– backdriving– output noise sensitivity– dynamic– diffusion input

D Q

Used in 1970’s

Page 13: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 13

Latch Design Transmission gate

+ No Vt drop

- Requires inverted clock D Q

Page 14: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 14

Latch Design Inverting buffer

+ Restoring

+ No backdriving

+ Fixes either• Output noise sensitivity• Or diffusion input

– Inverted output

D

XQ

D Q

Page 15: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 15

Latch Design Tristate feedback

+ Static– Backdriving risk

Static latches are now essential

because of leakage

QDX

Page 16: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 16

Latch Design Buffered input

+ Fixes diffusion input

+ Noninverting

QDX

Page 17: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 17

Latch Design Buffered output

+ No backdriving

Widely used in standard cells

+ Very robust (most important)- Rather large- Rather slow (1.5 – 2 FO4 delays)- High clock loading

Q

D X

Page 18: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 18

Latch Design Datapath latch

+ smaller

+ faster

- unbuffered input

Q

D X

Page 19: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 19

Flip-Flop Design Flip-flop is built as pair of back-to-back latches

D Q

X

D

X

Q

Q

Page 20: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 20

Enable Enable: ignore clock when en = 0

– Mux: increase latch D-Q delay– Clock Gating: increase en setup time, skew

D Q

Latc

h

D Q

en

en

Latc

hDQ

0

1

en

Latc

h

D Q

en

DQ

0

1

enD Q

en

Flo

p

Flo

p

Flo

p

Symbol Multiplexer Design Clock Gating Design

Page 21: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 21

Reset Force output low when reset asserted Synchronous vs. asynchronous

D

Q

Q

reset

D

Q

D

reset

Q

Dreset

reset

reset

Synchronous R

esetA

synchronous Reset

Sym

bol Flo

p

D Q

Latc

h

D Q

reset reset

Q

reset

Page 22: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 22

Set / Reset Set forces output high when enabled

Flip-flop with asynchronous set and reset

D

Q

reset

setreset

set

Page 23: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 23

Sequencing Methods Flip-flops 2-Phase Latches Pulsed Latches

Flip-F

lopsF

lop

Latc

h

Flo

p

clk

1

2

p

clk clk

Latc

h

Latc

h

p p

1 12

2-Phase T

ransparent LatchesP

ulsed Latches

Combinational Logic

CombinationalLogic

CombinationalLogic

Combinational Logic

Latc

h

Latc

h

Tc

Tc/2

tnonoverlap tnonoverlap

tpw

Half-Cycle 1 Half-Cycle 1

Page 24: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 24

Timing Diagrams

Flo

p

A

Y

tpdCombinational

LogicA Y

D Q

clk clk

D

Q

Latc

h

D Q

clkclk

D

Q

tcd

tsetup thold

tccq

tpcq

tccq

tsetup tholdtpcq

tpdqtcdq

tpdLogic Prop. Delay

tcdLogic Cont. Delay

tpcqLatch/Flop Clk->Q Prop. Delay

tccqLatch/Flop Clk->Q Cont. Delay

tpdqLatch D->Q Prop. Delay

tcdqLatch D->Q Cont. Delay

tsetupLatch/Flop Setup Time

tholdLatch/Flop Hold Time

Contamination and Propagation Delays

Page 25: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 25

Max-Delay: Flip-Flops

F1

F2

clk

clk clk

Combinational Logic

Tc

Q1 D2

Q1

D2

tpd

tsetuptpcq

setup

sequencing overhead

pd c pcqt T t t

Page 26: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 26

Max Delay: 2-Phase Latches

Tc

Q1

L1

1

2

L2 L3

1 12

CombinationalLogic 1

CombinationalLogic 2

Q2 Q3D1 D2 D3

Q1

D2

Q2

D3

D1

tpd1

tpdq1

tpd2

tpdq2

1 2

sequencing overhead

2pd pd pd c pdqt t t T t

Page 27: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 27

Max Delay: Pulsed Latches

Tc

Q1 Q2D1 D2

Q1

D2

D1

p

p p

Combinational LogicL1 L2

tpw

(a) tpw > tsetup

Q1

D2

(b) tpw < tsetup

Tc

tpd

tpdq

tpcq

tpd tsetup

setup

sequencing overhead

max ,pd c pdq pcq pwt T t t t t

Page 28: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 28

Min-Delay: Flip-Flops

holdcd ccqt t t CL

clk

Q1

D2

F1

clk

Q1

F2

clk

D2

tcd

thold

tccq

Page 29: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 29

Min-Delay: 2-Phase Latches

1, 2 hold nonoverlapcd cd ccqt t t t t CL

Q1

D2

D2

Q1

1

L1

2

L2

1

2

tnonoverlap

tcd

thold

tccq

Hold time reduced by nonoverlap

Paradox: hold applies twice each cycle, vs. only once for flops.

But a flop is made of two latches!

Page 30: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 30

Min-Delay: Pulsed Latches

holdcd ccq pwt t t t CL

Q1

D2

Q1

D2

p tpw

p

L1

p

L2tcd

thold

tccq

Hold time increased by pulse width

Page 31: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Itanium 2 ALU

11: Sequential Circuits 31

Page 32: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Combinational Logic Delays

Element Propagation Delay Contamination Delay

Adder 590 ps 100 ps

Result Mux 60 ps 35 ps

Early Bypass Mux 110 ps 95 ps

Middle Bypass Mux 80 ps 55 ps

Late Bypass Mux 70 ps 45 ps

2 mm Wire 100 ps 65 ps

11: Sequential Circuits 32

Page 33: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 33

Time Borrowing In a flop-based system:

– Data launches on one rising edge– Must setup before next rising edge– If it arrives late, system fails– If it arrives early, time is wasted– Flops have hard edges

In a latch-based system– Data can pass through latch while transparent– Long cycle of logic can borrow time into next– As long as each loop completes in one cycle

Page 34: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 34

Time Borrowing Example

Latc

h

Latc

h

Latc

h

Combinational LogicCombinational

Logic

Borrowing time acrosshalf-cycle boundary

Borrowing time acrosspipeline stage boundary

(a)

(b)

Latc

h

Latc

hCombinational Logic Combinational

Logic

Loops may borrow time internally but must complete within the cycle

1

2

1 1

1

2

2

Page 35: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 35

How Much Borrowing?

Q1

L1

1

2

L2

1 2

Combinational Logic 1Q2D1 D2

D2

Tc

Tc/2 Nominal Half-Cycle 1 Delay

tborrow

tnonoverlap

tsetup

borrow setup nonoverlap2cT

t t t

2-Phase Latches

borrow setuppwt t t

Pulsed Latches

Page 36: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 36

Clock Skew We have assumed zero clock skew Clocks really have uncertainty in arrival time

– Decreases maximum propagation delay– Increases minimum contamination delay– Decreases time borrowing

Page 37: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 37

Skew: Flip-Flops

F1

F2

clk

clk clk

Combinational Logic

Tc

Q1 D2

Q1

D2

tskew

CL

Q1

D2

F1

clk

Q1

F2

clk

D2

clk

tskew

tsetup

tpcq

tpdq

tcd

thold

tccq

setup skew

sequencing overhead

hold skew

pd c pcq

cd ccq

t T t t t

t t t t

Page 38: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 38

Skew: Latches

Q1

L1

1

2

L2 L3

1 12

CombinationalLogic 1

CombinationalLogic 2

Q2 Q3D1 D2 D3

sequencing overhead

1 2 hold nonoverlap skew

borrow setup nonoverlap skew

2

,

2

pd c pdq

cd cd ccq

c

t T t

t t t t t t

Tt t t t

2-Phase Latches

setup skew

sequencing overhead

hold skew

borrow setup skew

max ,pd c pdq pcq pw

cd pw ccq

pw

t T t t t t t

t t t t t

t t t t

Pulsed Latches

Page 39: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 39

Two-Phase Clocking If setup times are violated, reduce clock speed If hold times are violated, chip fails at any speed In this class, working chips are most important

– No tools to analyze clock skew An easy way to guarantee hold times is to use 2-

phase latches with big nonoverlap times Call these clocks 1, 2 (ph1, ph2)

Page 40: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 40

Safe Flip-Flop Past years used flip-flop with nonoverlapping clocks

– Slow – nonoverlap adds to setup time– But no hold times

In industry, use a better timing analyzer– Add buffers to slow signals if hold time is at risk

D

X

Q

Q

Page 41: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 41

Adaptive Sequencing

Designers include timing margin– Voltage– Temperature– Process variation– Data dependency– Tool inaccuracies

Alternative: run faster and check for near failures– Idea introduced as “Razor”

• Increase frequency until at the verge of error• Can reduce cycle time by ~30%

D Q

ERR

p

p

D

Q

X

ERR

X

Page 42: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Conventional CMOS Latches

11: Sequential Circuits 42

Page 43: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

More CMOS Latches

11: Sequential Circuits 43

Page 44: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Clocked CMOS Latches Sometimes called C2MOS Actually, similar to (d) in that it is tristate

11: Sequential Circuits 44

Page 45: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Conventional CMOS Flip-Flops

11: Sequential Circuits 45

Page 46: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

CMOS Flip-Flops This design has a potential race condition. Is more likely if there is skew between the two

phases of the clock. One alternative is NORA (NO Race) flip-flop. The other alternative is to use non-overlapping

clocks.

11: Sequential Circuits 46

Page 47: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

NORA Flip-flops

11: Sequential Circuits 47

Page 48: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

NORA Flip-flops

11: Sequential Circuits 48

Page 49: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Pulse Generators

11: Sequential Circuits 49

Page 50: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Pulsed Latches The Naffziger pulsed latch is used in Itanium 2

processors. It consists of the latch from (k) and the generator from (b). The pulse width is 1/6 the clock cycle.

The pulse generator of (d) is used in the NEC RISC processor.

Note that pulses are very fast and have to be distributed in the latch.

The Partovi pulsed latch (used on the AMD K6 and Athlon) builds the pulse generator into the latch.

11: Sequential Circuits 50

Page 51: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Pulsed Latches

11: Sequential Circuits 51

Page 52: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Resettable Latches and Flip-flops

There are two types of reset:– Asynchronous– Synchronous

Settable latches and flip-flops force the output high rather than low.

11: Sequential Circuits 52

Page 53: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Resettable Latches and Flip-flops

11: Sequential Circuits 53

Page 54: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Asynchronous Set and Reset

11: Sequential Circuits 54

Page 55: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Enabled Latches and Flip-flops

11: Sequential Circuits 55

Page 56: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Logic in Latches The sequencing overhead can be reduced by

incorporating logic into latches. The DEC Alpha 21164 used a whole assortment of

such latches.

11: Sequential Circuits 56

Page 57: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Klass Semidynamic FF (SDFF)

A cross between pulsed latch and a flip-flop. Used in Sun UltraSparc III along with built in logic.

11: Sequential Circuits 57

Page 58: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

SDFF Similar to the Partovi pulsed latch. However, it uses a dynamic NAND gate. Faster than the Partovi pulsed latch. Worse skew tolerance and time borrowing capability.

11: Sequential Circuits 58

Page 59: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Differential Flip-flops

11: Sequential Circuits 59

Page 60: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Differential Flip-flops

The design in (a) was used in the Alpha 21164. The SR latch formed by the NAND gates is just a

salve and can be replaced by inverters if necessary. The StrongArm 110 processor adds the weak nMOS

transistor to reduce the risk when the inputs switch while the clock is high.

The AMD K6 uses the design in (b) at the interface between static and domino logic.

11: Sequential Circuits 60

Page 61: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Dual Edge Triggered FFs

DET flip flops have a similar thoroughput at half the clock frequency.

11: Sequential Circuits 61

Page 62: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

DET FFs Zhao implicitly pulsed DET FF.

11: Sequential Circuits 62

Page 63: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Radiation Hardened FFs

11: Sequential Circuits 63

Page 64: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Some Design Guides Dynamic latches and registers have been avoided

since the 0.35 m technology node.– Use static latches and register.

Include provisions for testing– We will study these later.

Clock distribution, especially multiple phases are problematic.– We will study later.

Unless required performance is at the cutting edge, use registers.

11: Sequential Circuits 64

Page 65: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Some Design Guides Pulsed latches are best in terms of performance.

– Remember that they have long hold times. Extra circuitry may be necessary for short logic

paths.

11: Sequential Circuits 65

Page 66: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays

11: Sequential Circuits 66

Page 67: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays The set-up time cannot be crisply defined. If the data changes slightly less than a set-up time

before the clock edge, the register will still capture the correct value, but its clock-Q delay will be high.

Note that tDQ has a minimum when the slope of tCQ is -1.

tsetup is defined as the tDC at this point.

The propagation delay is the tCQ at this point.

The contamination delay tccq is the minimum tCQ that occurs when the input arrives early.

The hold time is the minimum delay from clock to D11: Sequential Circuits 67

tDQ = tDC + tCQ

Page 68: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays

11: Sequential Circuits 68

Page 69: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays The aperture width, ta is the width of the window

around the clock edge during which the data must not transition if the register is to produce the correct output with a propagation delay less than tpcq.

11: Sequential Circuits 69

tar = tsetup1 + thold 0

taf = tsetup 0 + thold1

Page 70: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays

11: Sequential Circuits 70

Page 71: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays If the data arrives before the clock rises (tDCr > 0), it

must wait for the clock. In this region, tCrQ is nearly constant and tDQ

increases as the data arrives earlier. If the data arrives after the clock rises, tDQ is

essentially independent of arrival time. The data must set up before the falling edge of the

clock. If the data arrives too close to the falling edge, tDQ

increases.

11: Sequential Circuits 71

Page 72: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Characterizing Delays Choose the setup time before the knee of the curve,

for example 5% greater than its minimum value. Pulsed latches have different definitions, but they

can be converter to ordinary latches by adding or subtracting pulse widths.

11: Sequential Circuits 72

tsetup −virtual = tsetup − tpw

tpcq −virtual = tpdq + t pw − tsetup( )

tpdq −virtual = tsetup −virtual + t pcq −virtual = t pdq

thold −virtual = thold + tpw

Page 73: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Delay Trade-offs

11: Sequential Circuits 73

Page 74: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

State Retention Registers

11: Sequential Circuits 74

Page 75: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Level Conversion

11: Sequential Circuits 75

Page 76: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Design Margins Designers derate their circuits by about 30% to cope

with variations. Adaptive sequential elements seek to reduce this

margin. Dynamic voltage scaling

– Precharacterize the circuit– Canary circuit– Double sampling the input

11: Sequential Circuits 76

Page 77: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Adaptive Sequencing

11: Sequential Circuits 77

Page 78: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Adaptive Sequencing (a) shows the conceptual diagram of a razor flip-flop,

while (b) is the timing diagram. The razor flip-flop has the drawback that it may

become metastable if D changes during the aperture.

An improvement is double sampling with time borrowing (DSTB).

(d) shows the Razor II pulsed latch.

11: Sequential Circuits 78

Page 79: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Synchronizers A synchronizer is a circuit that accepts an input that

can change at arbitrary times and produces an output aligned to its clock.

This is impossible to do in a finite time.

11: Sequential Circuits 79

Page 80: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Metastability

11: Sequential Circuits 80

Page 81: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Metastability

11: Sequential Circuits 81

Page 82: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Metastability

11: Sequential Circuits 82

Page 83: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Metastability The cross-coupled inverters behave like an amplifier

with gain G when A is near the metastable voltage Vm.

The delay can be modeled with an RC network. Let the initial voltage be A and a small offset from

the metastable point be a(0).

11: Sequential Circuits 83

A 0( ) = Vm + a 0( )

Ga t( ) − a t( )R

= Cda t( )

dt

a t( ) = a 0( )etτ s

τ s ≡RC

G −1

Page 84: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Metastability Assume that the node reaches a legal logic level

when The time to reach this level is

Note that the speed is given by the RC time constant.

High GBW is required.

11: Sequential Circuits 84

a t( ) ≥ ΔV

tDQ = τ s ln ΔV − ln a 0( )[ ]

P tDQ > ′ t ( ) =T0

Tc

e− ′ t

τ s

Page 85: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Synchronizers

11: Sequential Circuits 85

Page 86: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Synchronizers

11: Sequential Circuits 86

Page 87: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Synchronizers The probability of a synchronizer failure is

The mean time between failures is

11: Sequential Circuits 87

P failure( ) = NT0

Tc

e−

Tc −tsetup( )

τ s

MTBF =1

P failure( )=

Tce

Tc −tsetup

τ s

NT0

Page 88: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Degrees of SynchronyClassification Periodic f Description

Synchronous Yes 0 0 Signal has same frequency and phase as clock.Example: register to register on chip.

Mesosynchronous Yes Constant 0 Signal has same frequency, but is out of phase with clock. Safe to sample by delaying.Example: chip tp chip where both chips are using the same clock.

Plesiosynchronous

Yes Variesslowly

Small Signal has nearly the same frequency. Phase drifts slowly with time. Safe to sample signal if it is delayed by a variable, but predictable amount.Example: Board to board with same frequency but different crystals.

Periodic Yes Variesrapidly

Large Signal is periodic at arbitrary frequency. Board to board with different crystals.

Asynchronous No Unknown Unknown Signal changes arbitrarily.11: Sequential Circuits 88

Page 89: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Asynchronous Domains

11: Sequential Circuits 89

Page 90: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Asynchronous Domains

11: Sequential Circuits 90

Page 91: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Two-Phase Handshake

11: Sequential Circuits 91

Page 92: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Arbiters An arbiter decides which of the two inputs came first.

11: Sequential Circuits 92

Page 93: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Pipelining

11: Sequential Circuits 93

Page 94: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Wave Pipelining

11: Sequential Circuits 94

Page 95: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Schmitt Triggers

11: Sequential Circuits 95

Page 96: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Noise Suppression

11: Sequential Circuits 96

Page 97: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

CMOS Schmitt Trigger

11: Sequential Circuits 97

Page 98: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Schmitt Trigger Simulated VTC

2.5

VX (V) VM2

VM1

Vin (V)

Voltage-transfer characteristics with hysteresis.The effect of varying the ratio of the

PMOS device M4 . The width isk* 0.5 m.m

2.0

1.5

1.0

0.5

0.00.0 0.5 1.0 1.5 2.0 2.5

2.5

Vx (V)

k = 2k = 3

k = 4

k = 1

Vin (V)

2.0

1.5

1.0

0.5

0.00.0 0.5 1.0 1.5 2.0 2.5

Page 99: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

CMOS Schmitt Trigger 2

11: Sequential Circuits 99

Page 100: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Multivibrator Circuits

Bistable Multivibrator

Monostable Multivibrator

Astable Multivibrator

flip-flop, Schmitt Trigger

one-shot

oscillator

S

R

T

Page 101: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Transition-Triggered Monostable

DELAY

td

In

Outtd

Page 102: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Monostable Trigger (RC-based)VDD

InOutA B

C

R

In

B

Outt

VM

t2t1

(a) Trigger circuit.

(b) Waveforms.

Page 103: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Astable Multivibrators (Oscillators)

11: Sequential Circuits 103

Page 104: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Relaxation Oscillator

Out2

CR

Out1

Int

I1 I2

T = 2 (log3) RC

Page 105: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Voltage Controller Oscillator (VCO)

In

VDD

M3

M1

M2

M4

M5

VDD

M6

Vcontr Current starved inverter

Iref Iref

Schmitt Triggerrestores signal slopes

0.5 1.5 2.5Vcontr (V)

0.0

2

4

6

t pHL (

nsec

)

propagation delay as a functionof control voltage

Page 106: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Differential Delay Element and VCO

in2

two stage VCO

v1

v2

v3

v4

Vctrl

Vo2 Vo1

in1

delay cell

simulated waveforms of 2-stage VCO

0.5

0.0

0.5

1.0

1.5

2.0

2.5

3.0

20.51.5

V1 V2 V3 V4

time (ns)2.5 3.5

Page 107: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.

Pitfalls and Fallacies Incompletely reporting flip-flop delay. Failing to check hold times. Choosing a sequencing method too late in the

design. Failing to synchronize asynchronous inputs. Building faulty synchronizers.

11: Sequential Circuits 107

Page 108: Lecture 11:  Sequential Circuit Design

CMOS VLSI DesignCMOS VLSI Design 4th Ed.11: Sequential Circuits 108

Summary Flip-Flops:

– Very easy to use, supported by all tools 2-Phase Transparent Latches:

– Lots of skew tolerance and time borrowing Pulsed Latches:

– Fast, some skew tol & borrow, hold time risk