• No results found

Lecture 10: Sequential Circuits

N/A
N/A
Protected

Academic year: 2021

Share "Lecture 10: Sequential Circuits"

Copied!
41
0
0

Loading.... (view fulltext now)

Full text

(1)

Introduction to

CMOS VLSI

Design

Lecture 10:

Sequential Circuits

David Harris

(2)

CMOS VLSI Design

10: Sequential Circuits Slide 2

Outline

q  Sequencing

q  Sequencing Element Design q  Max and Min-Delay

q  Clock Skew

q  Time Borrowing

(3)

Sequencing

q  Combinational logic

–  output depends on current inputs q  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

(4)

CMOS VLSI Design

10: Sequential Circuits Slide 4

Sequencing Cont.

q  If tokens moved through pipeline at constant speed, no sequencing elements would be necessary

q  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 q  This is called wave pipelining in circuits

q  In most circuits, dispersion is high

(5)

Sequencing Overhead

q  Use flip-flops to delay fast tokens so they move through exactly one stage each cycle.

q  Inevitably adds some delay to the slow tokens q  Makes circuit slower than just the logic delay

–  Called sequencing overhead

q  Some people call this clocking overhead

–  But it applies to asynchronous circuits too

(6)

CMOS VLSI Design

10: Sequential Circuits Slide 6

Sequencing Elements

q  Latch: Level sensitive

–  a.k.a. transparent latch, D latch q  Flip-flop: edge triggered

–  A.k.a. master-slave flip-flop, D flip-flop, D register q  Timing Diagrams –  Transparent –  Opaque –  Edge-trigger D Flo p Lat ch Q clk clk D Q clk D Q (latch) Q (flop)

(7)

Sequencing Elements

q  Latch: Level sensitive

–  a.k.a. transparent latch, D latch q  Flip-flop: edge triggered

–  A.k.a. master-slave flip-flop, D flip-flop, D register q  Timing Diagrams –  Transparent –  Opaque –  Edge-trigger D Flo p Lat ch Q clk clk D Q clk D Q (latch)

(8)

CMOS VLSI Design

10: Sequential Circuits Slide 8

Latch Design

q  Pass Transistor Latch q  Pros

+ Tiny

+ Low clock load q  Cons

–  Vt drop

–  nonrestoring –  backdriving

–  output noise sensitivity –  dynamic

–  diffusion input

D Q

φ

(9)

Latch Design

q  Transmission gate

+ No Vt drop

- Requires inverted clock D Q

φ

(10)

CMOS VLSI Design

10: Sequential Circuits Slide 10

Latch Design

q  Inverting buffer + Restoring

+ No backdriving + Fixes either

•  Output noise sensitivity •  Or diffusion input –  Inverted output D φ φ X Q D Q φ φ

(11)

Latch Design

q  Tristate feedback + Static

–  Backdriving risk

q  Static latches are now essential

φ

φ φ

φ

Q

(12)

CMOS VLSI Design

10: Sequential Circuits Slide 12

Latch Design

q  Buffered input

+ Fixes diffusion input + Noninverting φ φ Q D X φ φ

(13)

Latch Design

q  Buffered output + No backdriving

q  Widely used in standard cells + Very robust (most important) -  Rather large

-  Rather slow (1.5 – 2 FO4 delays) -  High clock loading

φ φ Q D X φ φ

(14)

CMOS VLSI Design

10: Sequential Circuits Slide 14

Latch Design

q  Datapath latch + Smaller, faster - unbuffered input φ φ φ φ Q D X

(15)

Flip-Flop Design

q  Flip-flop is built as pair of back-to-back latches

D Q φ φ φ φ X D φ φ φ φ X Q Q φ φ

(16)

CMOS VLSI Design

10: Sequential Circuits Slide 16

Enable

q  Enable: ignore clock when en = 0 –  Mux: increase latch D-Q delay

–  Clock Gating: increase en setup time, skew

D Q Lat ch D Q en en φ φ Lat ch D Q φ 0 1 en Lat ch D Q φ en D Q φ 0 1 en D Q φ en F lo p F lo p F lo p

(17)

Reset

q  Force output low when reset asserted q  Synchronous vs. asynchronous D φ φ φ φ Q Q φ φ φ φ reset D φ φ φ Q φ φ D reset Q φ D reset φ reset Sy nc hr on ou s R es et As yn ch ro no S ymb ol Flo p D Q Lat ch D Q reset reset φ φ φ Q

(18)

CMOS VLSI Design

10: Sequential Circuits Slide 18

Set / Reset

q  Set forces output high when enabled

q  Flip-flop with asynchronous set and reset

D φ φ φ φ φ φ Q φ φ reset set reset set

(19)

Sequencing Methods

q  Flip-flops q  2-Phase Latches q  Pulsed Latches Fl ip-Fl op s Fl op Lat ch Fl op clk φ1 φ2 φp clk clk Lat ch Lat ch φp φp φ1 φ2 φ1 2-P ha se Tra ns pa re nt La tc he s P uls ed L atc he Combinational Logic Combinational Logic Combinational Logic Tc Tc/2 tnonoverlap tnonoverlap tpw Half-Cycle 1 Half-Cycle 1

(20)

CMOS VLSI Design

10: Sequential Circuits Slide 20

Timing Diagrams

F lo p A Y tpd Combinational Logic A Y D Q clk clk D Q Lat ch D Q clk clk D Q tcd tsetup t hold tccq tpcq tccq tsetup thold tpcq tpdq tcdq

tpd Logic Prop. Delay

tcd Logic Cont. Delay

tpcq Latch/Flop Clk-Q Prop Delay

tccq Latch/Flop Clk-Q Cont. Delay

tpdq Latch D-Q Prop Delay

tpcq Latch D-Q Cont. Delay

tsetup Latch/Flop Setup Time

thold Latch/Flop Hold Time

Contamination and Propagation Delays

(21)

Max-Delay: Flip-Flops

F1 F2 clk clk clk Combinational Logic Tc Q1 D2 Q1 D2 tpd tsetup tpcq

(

)

sequencing overhead pd c t T − 1 44 2 4 43

(22)

CMOS VLSI Design

10: Sequential Circuits Slide 22

Max-Delay: Flip-Flops

F1 F2 clk clk clk Combinational Logic Tc Q1 D2 Q1 D2 tpd tsetup tpcq

(

setup

)

sequencing overhead pd c pcq t T t +t 1 4 2 4 3

(23)

Max Delay: 2-Phase Latches

Tc Q1 L1 φ1 φ2 L2 L3 φ1 φ2 φ1 Combinational Logic 1 Combinational Logic 2 Q2 Q3 D1 D2 D3 Q1 D2 Q2 D1 tpd1 tpdq1 tpd2 tpdq2 ( ) 1 2 sequencing overhead pd pd pd c t =t +tT − 1 44 2 4 43

(24)

CMOS VLSI Design

10: Sequential Circuits Slide 24

Max Delay: 2-Phase Latches

Tc Q1 L1 φ1 φ2 L2 L3 φ1 φ2 φ1 Combinational Logic 1 Combinational Logic 2 Q2 Q3 D1 D2 D3 Q1 D2 Q2 D3 D1 tpd1 tpdq1 tpd2 tpdq2 ( ) 1 2 sequencing overhead 2 pd pd pd c pdq t =t +tTt 1 2 3

(25)

Max Delay: Pulsed Latches

Tc Q1 Q2 D1 D2 Q1 D2 D1 φp φp φp Combinational Logic L1 L2 tpw (a) tpw > tsetup Q1 D2 (b) tpw < tsetup Tc tpd tpdq tpcq tpd tsetup

(

)

sequencing overhead max pd c t T − 1 4 4 44 2 4 4 4 43

(26)

CMOS VLSI Design

10: Sequential Circuits Slide 26

Max Delay: Pulsed Latches

Tc Q1 Q2 D1 D2 Q1 D2 D1 φp φp φp Combinational Logic L1 L2 tpw (a) tpw > tsetup Q1 D2 (b) tpw < tsetup Tc tpd tpdq tpcq tpd tsetup

(

setup

)

sequencing overhead max , pd c pdq pcq pw t T t t +t t 1 4 4 4 4 2 4 4 4 43

(27)

Min-Delay: Flip-Flops

cd t ≥ CL clk Q1 D2 F1 clk Q1 F2 clk D2 tcd thold tccq

(28)

CMOS VLSI Design

10: Sequential Circuits Slide 28

Min-Delay: Flip-Flops

hold cd ccq t t t CL clk Q1 D2 F1 clk Q1 F2 clk D2 tcd thold tccq

(29)

Min-Delay: 2-Phase Latches

1, 2 cd cd 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!

(30)

CMOS VLSI Design

10: Sequential Circuits Slide 30

Min-Delay: 2-Phase Latches

1, 2 hold nonoverlap cd cd ccq t t t t t CL Q1 D2 D2 Q1 φ1 L1 φ2 L2 φ1 φ2 tnonoverlap tcd thold tccq

Hold time reduced by nonoverlap

(31)

Min-Delay: Pulsed Latches

cd t ≥ CL Q1 D2 Q1 D2 φp t pw φp L1 φp L2 tcd thold tccq

Hold time increased by pulse width

(32)

CMOS VLSI Design

10: Sequential Circuits Slide 32

Min-Delay: Pulsed Latches

hold cd ccq pw t t t + t CL Q1 D2 Q1 D2 φp t pw φp L1 φp L2 tcd thold tccq

Hold time increased by pulse width

(33)

Time Borrowing

q  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

q  In a latch-based system

–  Data can pass through latch while transparent –  Long cycle of logic can borrow time into next

(34)

CMOS VLSI Design

10: Sequential Circuits Slide 34

Time Borrowing Example

La tc h La tc h La tc h

Combinational Logic CombinationalLogic

Borrowing time across half-cycle boundary

Borrowing time across pipeline stage boundary

(a) (b) Latc h La tc h

Combinational Logic CombinationalLogic

Loops may borrow time internally but must complete within the cycle

φ1 φ2 φ1 φ1 φ1 φ2 φ2

(35)

How Much Borrowing?

Q1 L1 φ1 φ2 L2 φ1 φ2 Combinational Logic 1 Q2 D1 D2 D2 Tc Tc/2

Nominal Half-Cycle 1 Delay

tborrow

tnonoverlap

tsetup

(

)

borrow setup nonoverlap

2 c T t ≤ − t +t 2-Phase Latches borrow pw setup t t t Pulsed Latches

(36)

CMOS VLSI Design

10: Sequential Circuits Slide 36

Clock Skew

q  We have assumed zero clock skew

q  Clocks really have uncertainty in arrival time –  Decreases maximum propagation delay –  Increases minimum contamination delay –  Decreases time borrowing

(37)

Skew: Flip-Flops

F1 F2 clk clk clk Combinational Logic Tc Q1 D2 Q1 D2 tskew CL F1 clk Q1 F2 clk D2 clk tskew tsetup tpcq tpdq thold

(

setup skew

)

sequencing overhead hold skew pd c pcq cd ccq t T t t t t t t t ≤ − + + ≥ − + 1 4 44 2 4 4 43

(38)

CMOS VLSI Design

10: Sequential Circuits Slide 38

Skew: Latches

Q1 L1 φ1 φ2 L2 L3 φ1 φ2 φ1 Combinational

Logic 1 CombinationalLogic 2

Q2 Q3

D1 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 T t t t t ≤ − ≥ − − + ≤ − + + 1 2 3 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 ≤ − + − + ≥ + − + ≤ − + 1 4 4 4 4 4 2 4 4 4 4 4 3 Pulsed Latches

(39)

Two-Phase Clocking

q  If setup times are violated, reduce clock speed q  If hold times are violated, chip fails at any speed q  In this class, working chips are most important

–  No tools to analyze clock skew

q  An easy way to guarantee hold times is to use 2-phase latches with big nonoverlap times

(40)

CMOS VLSI Design

10: Sequential Circuits Slide 40

Safe Flip-Flop

q  In class, use flip-flop with nonoverlapping clocks –  Very slow – nonoverlap adds to setup time –  But no hold times

q  In industry, use a better timing analyzer

–  Add buffers to slow signals if hold time is at risk

D φ2 X Q Q φ1 φ2 φ1 φ1 φ1 φ2 φ2

(41)

Summary

q  Flip-Flops:

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

–  Lots of skew tolerance and time borrowing q  Pulsed Latches:

References

Related documents

Your Leading Banking Partner in Central and Eastern Europe.

Pretreatment with the extract of QBD, PGG, and EG could significantly decrease protein level (pulmonary edema) and inhibit the increase in the lung W/D ratio and

happy, then he will feel motivated to work his hardest to keep all his students happy and enjoying their science education... How do I

Number currently receiving adult services provided by the county – 96 Number currently receiving adult services by providers – 224. Number currently receiving

Additionally, they stated that with the[ relatively new] online master’s degree, the program was required to offer enough courses online in order for the online students to

In the year 2007, Hwang HS et al , showed that hs-CRP levels were positively correlated to pregnancy duration in healthy women and could be used as a severity marker in

Keywords: Civic integrationist turn, Citizenship education, Denmark, Sweden, Public philosophy, Mother tongue instruction, Civics, History,

The distinction appears primarily at the modeling level, since all motion-damper devices ultimately work as a result of some kind of internal energy conversion at the molecular