sequential circuits - utep · 2013-03-10 · sequential element review! sequential elements provide...

28
Sequential Circuits Prof. MacDonald

Upload: others

Post on 29-May-2020

6 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Sequential Circuits

Prof. MacDonald

Page 2: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Sequential Element Review l  Sequential elements provide memory for circuits

–  heart of a state machine – saving current state –  used to hold or pipe data – data registers, shift registers

l  Two varieties –  level sensitive transparent latch – less common –  edge sensitive master-slave flip-flop – everywhere

Page 3: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

General Sequential Circuit

combinational circuits

inputs outputs

state next state 4 flip flops

Page 4: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

General Sequential Circuit – cone of logic

D FF

D FF

D FF Chip Input

Page 5: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Latch Schematic

gate

d

gateN

gateN

q

Page 6: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Latch Schematic - better

gate

d q

Page 7: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

CMOS Tri-state Inverter

~en

en

input output

Page 8: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Latch Operation

time

Q

G

D

l  Gate Low – Q holds value and ignores D l  Gate High – transparent – Q follows D after delay

Page 9: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Latch Common Uses

time

Q

G

D

Most common – basic building block of Flip-Flop Other uses – to condition enable for clock gating

Page 10: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Standard CMOS D Flip-Flop Diagram

D Latch

D G

Q

D Latch

D G

Q

D

Q

CLK

Two doors – never simultaneously open or closed. Q is never directly influenced by D.

Page 11: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Schematic

D

CLK

Q

Page 12: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Operation

time

Q

CLK

D

Sample input at edge and launch to output. Input must be good for “setup time” before and “hold time” after the edge to sample correctly – sampling window.

Tsu

Th

Tlaunch

Page 13: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Set-up Times The time before the rising edge during which the data must

be stable to be sampled correctly. Logic designers can slow the clock (bigger period) to

alleviate setup problems – but less performance. A good Flip-Flop design will have a very short set-up time.

Q

Page 14: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Set-up Times Data must make it to net A before clock switches the

tri-states in first latch. Need to understand the delay of the clock to the first latch

versus the delay of the data.

Q

net A

Page 15: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Set-up Times Adding logic in the data path increases set-ups and

therefore decreases performance. Muxes often added for either functional or test purposes.

Q

net A

d0 d1 sel clk

Page 16: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Hold Times Hold times describe how long the data must be stable after the rising edge. Often the hold time is zero. Although hold times do not affect frequency, if you fail to

meet them, your chip will not work and slowing it down will not help.

Q

Page 17: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

D Flip-Flop Launch Times Time required for data at input to be sampled and launched

from the input. This adds to the time it requires to start through the cone of

logic and get to the next flip-flop therefore increases period of clock and slows performance.

Q

Page 18: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

General Sequential Circuit – cone of logic

D FF

D FF

D FF

D FF

Tsu=1ns Tp=1ns Tp=2ns

Tp=2ns

Tlaunch=1ns

Tp=0.5ns

Tlaunch=1ns

Tlaunch=1ns

How fast can this logic run?

Page 19: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Alternative Designs Pulsed Latch – faster but less robust Latches not good for sequential elements due to race condition when transparent. Make a glitch enable at rising edge and can get away with a latch.

D

CLK

delay

Page 20: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Alternative Designs

time

Q

CLK

D

Page 21: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Meta-stability

time

CLK

D

Common logic or circuit design interview question. If input is asynchronous, then it is possible for input to

change exactly at rising edge and latch a middle value. This is called the meta-stable point and results in

indeterminate operation and high static power consumption.

Page 22: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Meta-stability

VoutA VinB

VinA VoutB

meta-stable point – theoretically possible to be stable here

Page 23: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Meta-stability

D FF D FF

asynch signal from different clock domain or outside world

synchronized version of signal

Many standard cell libraries claim to have meta-stable hardened sequential elements where double-registering them is not necessary. How? Change in the design? Is new technology more or less susceptible to meta-stability?

Page 24: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Flip-Flop Design Guidelines l  Need narrow sampling window

–  small setup time requirement –  small hold time requirements

l  Need fast launch time l  Minimize the clock loading to minimize power

–  clock is most active net on chip and more load = more Pd

l  Buffer all inputs so internal signals are cleaner l  Need good drive output to drive higher fanout l  100k-1M flip-flops on a typical design

–  smaller is better – transistor counts can vary from 15-40.

Page 25: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Half Latch Flip Flop

clk

C – HLFF

D

clk

clk

clki

D clki

clki

Q

Qb

2.0

4.0

4.0

8.0

0.125 0.1254.0

8.0

8.0

10.0clk

C – HLFF

D

clk

clk

clki

D clki

clki

Q

Qb

2.0

4.0

4.0

8.0

0.125 0.1254.0

8.0

8.0

10.0

Page 26: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Sense Amp Flip Flop

4.0 4.0

2.0

2.0

2.0

Q QB

D DB

Clk

D- SAFF

4.0 4.0

2.0

2.0

Page 27: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Dynamic D Flip Flop

4.0

4.0

1.0

clk

clk

2.0 clk

X D

N

2.0

2.0

clk 2.0

Q Qb

0.5 Q

F - Dynamic D Flip Flop with Keepers

2.0

0.5

2

0.5

Page 28: sequential circuits - UTEP · 2013-03-10 · Sequential Element Review! Sequential elements provide memory for circuits – heart of a state machine – saving current state – used

Rad-hard Latch

2.0

1.0

1.0

0.5

2.0

1.0

4.0

1.0

1.0

4.0

2.0

1.0

1.0

2.0

2.0

1.0

1.0

2.0

Clki

Clk

D

Clk

Clki

Clk

Clki

Q

Qb

A – DICE (Single Latch)

2.02.0

1.01.0

1.01.0

0.50.5

2.02.0

1.01.0

4.04.0

1.01.0

1.01.0

4.04.0

2.02.0

1.01.0

1.01.0

2.02.0

2.02.0

1.01.0

1.01.0

2.02.0

Clki

Clk

D

Clk

Clki

Clk

Clki

Q

Qb

A – DICE (Single Latch)