sequential circuit design: part 1 - all...

17
1 Krish Chakrabarty 1 Sequential Circuit Design: Part 1 Design of memory elements Static latches Pseudo-static latches Dynamic latches Timing parameters Two-phase clocking Clocked inverters Krish Chakrabarty 2 Sequential Logic 2 storage mechanisms • positive feedback • charge-based LOGIC t p,comb In Out FFs

Upload: others

Post on 09-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

1

Krish Chakrabarty 1

Sequential Circuit Design: Part 1

• Design of memory elements– Static latches

– Pseudo-static latches

– Dynamic latches

• Timing parameters

• Two-phase clocking

• Clocked inverters

Krish Chakrabarty 2

Sequential Logic

2 s torage mechanis ms

• pos itive feedback

• charge-bas ed

LOGIC

tp,combInOut

FFs

Page 2: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

2

Krish Chakrabarty 3

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

Krish Chakrabarty 4

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 3: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

3

Krish Chakrabarty 5

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

Krish Chakrabarty 6

Sequencing Elements• Latch: Level sensitive

– a.k.a. transparent latch, D latch

• Flip-flop: edge triggered– A.k.a. master-slave flip-flop, D flip-flop, D register

• Timing Diagrams– Transparent

– Opaque

– Edge-trigger

Page 4: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

4

Krish Chakrabarty 7

Flip-Flop: Timing Definitions

DATA

STABLE

In

t

tsetup thold

DATA

STABLE

Out

t

tpFF

t

Krish Chakrabarty 8

Maximum Clock Frequency

LOGIC

tp,comb

FFs

Page 5: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

5

Krish Chakrabarty 9

Latch Design

• Pass Transistor Latch• Pros

+ Tiny+ Low clock load

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

Used in 1970’s

Krish Chakrabarty 10

Latch Design

• Transmission gate+ No Vt drop

- Requires inverted clock

Page 6: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

6

Krish Chakrabarty 11

Latch Design

• Inverting buffer+ Restoring

+ No backdriving

+ Fixes either

• Output noise sensitivity

• Or diffusion input

– Inverted output

Krish Chakrabarty 12

Latch Design

• Buffered input+ Fixes diffusion input

+ Noninverting

Page 7: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

7

Krish Chakrabarty 13

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

Krish Chakrabarty 14

Latch Design

• Tristate feedback+ Static

– Backdriving risk

• Static latches are now essential

Page 8: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

8

Krish Chakrabarty 15

Latch Design

• Datapath latch+ Smaller, faster

- unbuffered input

Krish Chakrabarty 16

Design of Memory Elements

Q

C

C

C

C

D

Q

Positive edge-triggered D flip-flopWhy use inverters on outputs?

Skew Problem : may be delayed with respect to (both may be 1 at the same time)

This is what happens-

Q

QD

C

in

1 Transmission gate acts a buffer, should have samedelay as inverter

Eliminating/Reducing skew:

Page 9: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

9

Krish Chakrabarty 17

Latch design

Static D latch “Jamb” latch Weak inverter

CC

C

D DQ Q

Krish Chakrabarty 18

Latch Design

CD C

Q

Variant of D latch

D Q

Page 10: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

10

Krish Chakrabarty 19

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

Krish Chakrabarty 20

Enable• Enable: ignore clock when en = 0

– Mux: increase latch D-Q delay

– Clock Gating: increase en setup time, skew

Page 11: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

11

Krish Chakrabarty 21

Reset• Force output low when reset asserted

• Synchronous vs. asynchronous

Krish Chakrabarty 22

Set / Reset

• Set forces output high when enabled

• Flip-flop with asynchronous set and reset

Page 12: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

12

Krish Chakrabarty 23

Dynamic Latches

• So far, all latches have been static-store state when clock is stopped but power is maintained

• Dynamic latches reduce transistor count

• Eliminate feedback inverter and transmission gate

• Latch value stored on the capacitance of the input (gate capacitance)

Krish Chakrabarty 24

Dynamic Latch and Flip-Flop

• Difficult to ensure reliable operation

• Similar to DRAM

• Refresh cycles are required

CD QC

Data stored asCharge on gate capacitance

Dynamic D latch

CD QDynamic negativeedge-triggered D flip-flop

C

Page 13: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

13

Krish Chakrabarty 25

Charge-Based Storage

Schematic diagram

Non-overlapping clocks

P s e u do -s ta tic Latc h

QD

Q

Krish Chakrabarty 26

Master-Slave Flip-Flop

A

B

Overlapping Clocks Can Caus e

• Race Conditions

• Undefined Signals

D

Q

To reduce skew: generatecomplement of clock within the cellExtra inverter per cell

Page 14: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

14

Krish Chakrabarty 27

Two-Phase Clocking

• Inverting a single clock can lead to skew problems

• Employ two non-overlapping clocks for master and slave sections of a flip-flop

• Also, use two phases for alternating pipeline stages

Krish Chakrabarty 28

Two-Phase Clocking

1(t) . 2(t) = 02

1=1, 2 = 0

1

2

CD QC

1

D Q

1=0, 2 = 1D Q

Page 15: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

15

Krish Chakrabarty 29

2-phase non-overlapping clocks

1

2

t

Important:Non-overlap time t must bekept small

2

1

1

2 Q

D

Pseudo-staticD flip-flop

Krish Chakrabarty 30

2-phase dynamic flip-flop

21

Input Sampled

Output Enable

1

2

D Q

Page 16: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

16

Krish Chakrabarty 31

Use of “p” Leakers

Q

Degraded voltage VDD-Vt

Flip-flopbased on nMOSpass gates

1 2

D

Q

1 2

D

No need to route signals

pMOS leaker transistorsprovide full-restored logiclevelsProblem: Increased delay

(extra inverter)

Krish Chakrabarty 32

Clocked Inverters

Q

Similar to tristate buffer = 1, acts as inverter

= 0, output = Z

D

i1 i2 i3Q

D

D Latch

Page 17: Sequential Circuit Design: Part 1 - All Facultypeople.ee.duke.edu/.../Lectures/SequentialCircuits_1.pdf · 2011-10-22 · Sequential Circuit Design: Part 1 • Design of memory elements

17

Krish Chakrabarty 33

Flip-flop insensitive to clock overlap

C2MOS flip-flop

VDDVDD

M1

M3

M4

M2 M6

M8

M7

M5

CL1 CL2

X

C2MOS master-slave negative edge-triggered D flip-flop

D

-section -section

Q

Krish Chakrabarty 34

C2MOS avoids Race Conditions