You are on page 1of 68

Sequential Logic

References:
Adapted from: Digital Integrated Circuits: A Design
Perspective, J. Rabaey, Prentice Hall UCB
Principles of CMOS VLSI Design: A Systems Perspective,
N. H. E. Weste, K. Eshraghian, Addison Wesley

Clocked Systems: Finite State Machines


Inputs

Outputs
Combinational
Logic

Current state bits

Out = f(In, State)

Next state bits

Registers

Clock or clocks

Registers serve as storage element to store past history

Clocked Systems: Pipelined Systems

Outputs

Inputs
D

D
Logic

Logic

Registers
Clock

Registers serve as storage element to capture the output


of each processing stage

Storage Mechanisms
Positive feedback
Connect one or more output signals back to the input
Regenerative, signal can be held indefinitely, static

Charge-based
Use charge storage to store signal value
Need refreshing to overcome charge leakage, dynamic

Positive Feedback: Two Cascaded Inverters

Vi1

Vo1= Vi2

Vi2= Vo1

Vo2

Vi2=Vo1

Vi2=Vo1

Bi-Stability and Meta-Stability

Vi1=Vo2
Gain larger than 1 amplifies
the deviation from C

Vi1=Vo2
Gain less than 1 reduces
the deviation from A

SR-Flip Flop
NOR-based SR flip-flop, positive logic

Schematic

Logic Symbol

Characteristic table

NAND-based SR flip-flop, negative logic

Schematic

Logic Symbol

Forbidden state

Characteristic table

JK- Flip Flop

Schematic

Logic Symbol

Characteristic table

Clock input to synchronize changes in the output


logic states of flip-flops
Forbidden state is eliminated,
But repeated toggling when J = K = 1, need to keep
clock pulse small < propagation delay of FF

Other Flip-Flops

Toggle or T flip-flop

Delay or D flip-flop

Race Problem
A flip-flop is a latch if the gate is transparent while the
clock is high (low)

Signal can raise around when


Solutions:

is high

Reduce the pulse width of


Master-slave and edge-triggered FFs

Master-Slave Flip-Flop

Either master or slave FF is in the hold mode


Pulse lengths of clock must be longer than
propagation delay of latches
Asynchronous or synchronous inputs to initialize the
flip-flop states

One-Catching or Level-Sensitive

QM
QS

Propagation Delay Based Edge-Triggered

Depend only on the value of


In just before the clock
transition

Edge Triggered Flip-Flop

Flip-Flop: Timing Definitions

Maximum Clock Frequency

t pFF

t p,comb tsetup

Timing Metrics in Sequential Circuits


Setup Time (tsu) is the time that the data inputs must be valid before the
clock transition
Hold Time (thold) is the time that the data inputs must be valid after the
clock transition
Propagation delays (treg,max, treg,min) D input is copied to Q
tsu , thold,
treg,max, treg,min
Register
D

CLK

tlogic,max, tlogic,min
comb.
logic

Register
D

Setup Time, Hold Time, and Propagation Delay


CLK

T
t
thold

Register

D
D

Data
Stable

t
CLK

treg,max

tlogic,max

tsu

treg,max

Data
Stable

Data
Stable

treg ,max tlog ic,max tsetup


tlog ic,min treg ,min

thold

Multiplexer Based Latches


A latch is a level-sensitive device

CLK
0
Q
D

___
CLK

1
D
CLK
CLK

NMOS-only MUX based Latch


__
QM

CLK
D

QM

___
CLK
Load of only 2 transistors to clock signals
Passes a degraded high voltage of VDD VTn

Master Slave Edge-Triggered Register


A register is an edge-triggered storage element
A Flip-Flop is any bistable component formed by the cross-coupling
of gates
Slave

Master
0
Q

1
QM
D

1
CLK

CLK

Master Slave Edge-Triggered Register


___
CLK
I2

CLK

I3

T4

T2

I1

QM
T3

T1
I4

___
CLK
Setup Time: 3*tinv + ttx

CLK
(I1T1 I3I2)

Propagation Delay: ttx + tinv


Hold Time: 0

___
CLK

CLK
D

I6

I5

(T3 I6)

CMOS Clocked SR Flip-Flop

VDD
S

M2

M4

Q
M6

M1

M3

M8

R
S

M5

M7

Transistor Sizing of SR Flip-Flop


Assume transistors of inverters are sized so that VM
is VDD/2, mobility ratio n/ p = 3
(W/L)M1 = (W/L)M3 = 1.8/1.2
(W/L)M2 = (W/L)M4 = 5.4/1.2

To bring Q from 1 to 0, need to properly ratio the


sizes of pseudo-NMOS inverter (M7-M8)-M4
VOL must be lower than VDD/2

kn,M 78 VDD

2
VDD
8

V
Vtn DD
2

(W / L) M 78

k p ,M 4 VDD

(W / L) M 4

V
| Vtp | DD
2

(W / L) M 3

(W / L) M 7

2(W / L) M 78 2(W / L) M 3

(3.6 / 1.2)

2
VDD
8

Flip-Flop: Transistor Sizing

Propagation Delay

PseudoNMOS
Inverter
inverter
M3-M4
(M5-M6)-M2

Complementary CMOS SR Flip-Flop


VDD
M10

M12

M9

M11
M2

M4

Q
M6

M5

M1

M3

M8

M7

Eliminates pseudo-NMOS inverters


Faster switching and smaller transient current

6-Transistor SR Flip-Flop
VDD
M2

M4

Q
Q

R
M1

M3

CMOS D Flip-Flop
VDD
D

Q
Q
Q
Q

Master-Slave D Flip-Flop

VDD

Q
Q

Negative-Level Sensitive D Flip-Flop


VDD

D
D

Master-Slave D Flip-Flop

VDD

Q
D

CVSL-Style Master-Slave D-FF

VDD

VDD

Q
D

Charge-Based Storage

D
In

Pseudo-static Latch

Layout of a D Flip-Flop

In
Q

In

Master-Slave Flip-Flop

D
A
In
B

Overlapping clocks can cause


race conditions
undefined signals

2 Phase Non-Overlapping Clocks


D
1

A
In

t p12
2

Asynchronous Setting
D
1

A
In

-Set
2

Dynamic Edge-Triggered Register


___
CLK

CLK
D

T1
___
CLK

N1

I1

C1

N2

T2

I2
Q

CLK

C2

(0, 0) overlap
(1,1) overlap

CLK

t(0,0) overlap

___
CLK

thold

tT 1 tI 1 tT 2

t(1,1) overlap

2-phase Dynamic Flip-Flop

A
In

Input
sampled

Output
Enabled

Flip-flop Insensitive to Clock Overlap


VDD

VDD

M2

M6

M4

M8
X

In
M3

CL1

M7

M1

-section

M5

-section

C2MOS Latch or Clocked CMOS Latch

CL2

C2MOS Latch Avoids Race Conditions


VDD

VDD

M2

M6

In
1

M3
M1

CL1

D
1

M7

CL2

M5

Cascaded inverters: needs one pull-up followed by


one pull-down, or vice versa to propagate signal
(1-1) overlap: Only the pull-down networks are active,
input signal cannot propagate to the output
(0-0) overlap: only the pull-up networks are active

C2MOS Latch Avoids Race Conditions


C2MOS latch is insensitive to overlap, as long a the
rise and fall times of clock edges are sufficiently small

Clocked CMOS Logic

In1-3

Replace the inverter in a C2MOS latch with a


complementary CMOS logic
VDD

VDD

PUN

PUN

M4

M8
X

In1-3

M3
PDN

CL1

M7

CL2

PDN

Divide the computation into stages: Pipelining

Tmin

t p,reg

tsetup ,reg

REG

Tmin, pipe

log

REG

REG

REG
b

t p,logic

Pipelined

REG

REG

log
b

Non-pipelined
REG

REG

Pipelining

t p,reg

max(t p,adder , t p,abs , t p,log ) tsetup ,reg

Pipelined Logic using C2MOS


VDD

VDD

VDD

out
In

F
C1

G
C2

C3

NORA CMOS (NO-RAce logic)


Race free as long as all the logic functions F and G
between the latches are non-inverting

Example
VDD

VDD
VDD

In

Number of static inversion should be even

NORA CMOS -module

Logic

Latch

=0

Precharge

Hold

=1

Evaluate

Evaluate

NORA CMOS -module

Logic

Latch

=0

Evaluate

Evaluate

=1

Precharge

Hold

NORA Logic
NORA data path consists of a chain of alternating
and modules
Dynamic-logic rule: single 0
1 (1
0) transition for
dynamic n-block ( p-block)
C2MOS rule:
If dynamic blocks are present, even number of static
inversions between a latch and a dynamic block
Otherwise, even number of static inversions between latches

Static logic may glitch, best to keep all of them after


dynamic blocks

Doubled C2MOS Latches

Doubled n-C2MOS latch

Doubled p-C2MOS latch

TSPC - True Single Phase Clock Logic

Including logic into


the latch

Inserting logic between


the latches

Simplified TSPC Latches

A and A do not have full logic swing

Master-Slave Flip-flops

Positive-edge triggered D-FF

Negative-edge triggered D-FF

Master-Slave Simplified TSPC Flip-Flops

Positive edge-triggered D flip-flops


Reduces clock load

Further Simplication

Schmitt Trigger

VTC with hysteresis


Restores signal slopes

Noise Suppression using


Schmitt Trigger

Sharp low-to-high transition

CMOS Schmitt Trigger

Moves switching threshold


of first inverter

Sizing of M3 and M4
VM+ = 3.5V
M1 and M2 are in saturation; M4 is in triode region

k1
VM
2
k2
VDD VM
2

| Vtp |

Vtn

k4 VDD | Vtp | VDD VM

VDD VM
2

VM- = 1.5V
M1 and M2 are in saturation; M3 is in triode region

Schmitt Trigger: Simulated VTC

CMOS Schmitt Trigger


In = 0, at steady state, VOut = VDD, VX =
VDD - Vtn
In makes a 0 1 transition
Saturated load inverter M1-M5 discharges
X
M2 inactive until VX = Vin - Vtn
Use Vin to approximate VM M1-M5 in saturation

k1
VM
2

Vtn

k5
VDD VM
2

Multivibrator Circuits
R
S

Bistable Multivibrator
flip-flop, Schmitt Trigger
T

Monostable Multivibrator
one-shot
Astable Multivibrator
oscillator

Transition-Triggered Monostable

In

DELAY
td

Out
td

Detects changes in the input signal


produces a pulse to initialize subsequent circuitry
e.g., address transition detection in static memories

Monostable Trigger (RC-based)

Astable Multivibrators (Oscillators)

T=2

tp

Voltage Controller Oscillator (VCO)


Schmitt trigger
restores signal slopes

Current starved inverter

Decrease Vcontr to reduce discharge current


increase propagation delay of inverter
decreases oscillating frequency
(quadratic dependency)

Relaxation Oscillator

T=2

(ln 3)

RC

You might also like