Sei sulla pagina 1di 31

Digital Integrated Circuits

A Design Perspective

Designing Sequential Logic Circuits


Bassam Jamil & Saed Abed
Digital Integrated Circuits2nd
Sequential Circuits

Sequential Logic
Inputs COMBINATIONAL LOGIC Current State Registers
Q D

Outputs

Next state

CLK

Digital Integrated Circuits2nd

Sequential Circuits

Naming Conventions
In

our text:

a latch is level sensitive a register is edge-triggered For instance, many books call edgetriggered elements flip-flops

Digital Integrated Circuits2nd

Sequential Circuits

Static vs Dynamic Storage

Static storage
preserve state as long as the power is on have positive feedback (regeneration) with an internal connection between the output and the input useful when updates are infrequent (clock gating)

Dynamic storage
store state on parasitic capacitors only hold state for short periods of time (milliseconds) require periodic refresh usually simpler, so higher speed and lower power
4

Digital Integrated

Circuits2nd

Sequential Circuits

Latches vs Flipflops

Latches
level sensitive circuit that passes inputs to Q when the clock is high (or low) - transparent mode input sampled on the falling edge of the clock is held stable when clock is low (or high) - hold mode

Flipflops (edge-triggered)
edge sensitive circuits that sample the inputs on a clock transition
positive edge-triggered: 0 1 negative edge-triggered: 1 0

built using latches (e.g., master-slave flipflops)


Digital Integrated Circuits2nd
5

Sequential Circuits

Latch versus Register

Latch stores data when clock is low


D Q Clk
Clk D Q

Register stores data when clock rises


D Q Clk

Clk D Q
Sequential Circuits

Digital Integrated Circuits2nd

Latches

Digital Integrated Circuits2nd

Sequential Circuits

Latch-Based Design
N latch is transparent when f = 0
f

P latch is transparent when f = 1

N Latch

Logic

P Latch

Logic
Digital Integrated Circuits2nd

Sequential Circuits

Timing Metrics/Definitions

Setup time (tsu) Hold time (thold) Propagation delay (tc-q) T tsetup + tclk-Q + tp_logic

Also: tcdreg + tcdlogic > thold tcd: contamination delay = minimum delay

CLK t
Register

tsu
D

thold

Q
CLK

DATA STABLE

t
q

tc 2 Q

DATA STABLE

Digital Integrated Circuits2nd

Sequential Circuits

Review: The Regenerative Property


Vi1 Vo1 Vi2 Vo2

cascaded inverters
A

C
B

If the gain in the transient region is larger than 1, only A and B are stable operation points. C is a metastable operation point.

Vi1 = Vo2
10

Digital Integrated

Circuits2nd

Sequential Circuits

Bistable Circuits
Vi1 The cross-coupling of two inverters results in a Vi2 bistable circuit (a circuit with two stable states) Have to be able to change the stored value by making A (or B) temporarily unstable by increasing the loop gain to a value larger than 1

done by applying a trigger pulse at Vi1 or Vi2 the width of the trigger pulse need be only a little larger than the total propagation delay around the loop circuit (twice the delay of an inverter)

Two approaches used


cutting the feedback loop (mux based latch) overpowering the feedback loop (as used in SRAMs)
Circuits2nd
11

Digital Integrated

Sequential Circuits

Writing into a Static Latch


Use the clock as a decoupling signal, that distinguishes between the transparent and opaque states
CLK

CLK
Q CLK

D CLK

CLK

Converting into a MUX


Digital Integrated Circuits2nd

Forcing the state (can implement as NMOS-only)


12

Sequential Circuits

MUX Based Latches

Change the stored value by cutting the feedback loop


feedback feedback

1 Q

0 Q

0
clk Negative Latch

1
clk Positive Latch

Q = clk & Q | !clk & D transparent when the clock is low


Digital Integrated Circuits2nd

Q = !clk & Q | clk & D transparent when the clock is high


13

Sequential Circuits

TG MUX Based Latch Implementation


clk Q !clk D clk clk D Q !clk input sampled (transparent mode)

clk
Digital Integrated Circuits2nd

feedback (hold mode)

14

Sequential Circuits

PT MUX Based Latch Implementation


clk D !Q Q

input sampled (transparent mode) !clk

Reduced clock load, but threshold drop at output of pass transistors so reduced noise margins and performance
Digital Integrated Circuits2nd

clk !clk

feedback (hold mode)

15

Sequential Circuits

Master Slave Based ET Flipflop


D 0 1 D 0 clk Master clk = 0 transparent clk = 01 hold Q clock 1 clk Slave clk D QM Q
16

QM

hold
Circuits2nd

transparent

Digital Integrated

Sequential Circuits

MS ET Implementation
Master Slave I2 T2 I3 QM D clk master transparent slave hold clk !clk
Digital Integrated Circuits2nd
18

I5

T4

I6

I1

T1

I4

T3

master hold slave transparent

Sequential Circuits

MS ET Timing Properties

Assume propagation delays are tpd_inv and tpd_tx, that the contamination delay is 0, and that the inverter delay to derive !clk is 0 Set-up time - time before rising edge of clk that D must be valid
3 * tpd_inv + tpd_tx

Propagation delay - time for QM to reach Q

Hold time - time D must be stable after rising edge of clk


zero
19

tpd_inv + tpd_tx

Digital Integrated

Circuits2nd

Sequential Circuits

Set-up Time Simulation


3 2.5 2

3 2.5

QM D clk I2 out
0 0.2 0.4 0.6 0.8 1

2 1.5 1 0.5 0 -0.5 0 0.2 0.4 0.6 0.8 1

1.5
1 0.5

0
-0.5

tsetup = 0.21 ns

tsetup = 0.20 ns
Fails

Digital Integrated Circuits2nd

Sequential Circuits

Propagation Delay Simulation


3 2.5 2 1.5

tc-q(LH) = 160 psec

Volts

1 0.5 0 -0.5 0

tc-q(LH)

tc-q(HL)

tc-q(HL) = 180 psec

0.5

1.5

2.5
21

Time (ns)
Digital Integrated Circuits2nd
Sequential Circuits

Reduced Load MS ET FF

Clock load per register is important since it directly impacts the power dissipation of the clock network. Can reduce the clock load (at the cost of robustness) by making the circuit ratioed
clk
I1 D T
1

!clk
I3 QM T
2

I2
!clk clk

I4
reverse conduction

to switch the state of the master, T1 must be sized to overpower I2 to avoid reverse conduction, I4 must be weaker than I1
Circuits2nd
22

Digital Integrated

Sequential Circuits

Non-Ideal Clocks
clk !clk clk !clk

Ideal clocks

Non-ideal clocks clock skew 1-1 overlap

0-0 overlap
Digital Integrated Circuits2nd
23

Sequential Circuits

Example of Clock Skew Problems


clk X !clk Q

P1

I1
P2 !clk

I2
B

P3

I3
P4 clk

I4

!Q

Race condition direct path from D to Q during the short time when both clk and !clk are high (1-1 overlap) Undefined state both B and D are driving A when clk and !clk are both high Dynamic storage when clk and !clk are both low (0-0 24 overlap) 2nd

Digital Integrated Circuits

Sequential Circuits

Pseudostatic Two-Phase ET FF
clk1 D P1 X clk2 P3 B I3 P4 clk1 dynamic storage I4 Q

I1

I2

!Q

P2
clk2

master transparent slave hold


clk1

tnon_overlap
clk2
Digital Integrated Circuits2nd

master hold slave transparent


25

Sequential Circuits

Non-Ideal Clocks
clk !clk clk !clk

Ideal clocks

Non-ideal clocks clock skew 1-1 overlap

0-0 overlap
Digital Integrated Circuits2nd
26

Sequential Circuits

Example of Clock Skew Problems


clk X !clk Q

P1

I1
P2 !clk

I2
B

P3

I3
P4 clk

I4

!Q

Race condition direct path from D to Q during the short time when both clk and !clk are high (1-1 overlap) Undefined state both B and D are driving A when clk and !clk are both high Dynamic storage when clk and !clk are both low (0-0 27 overlap) 2nd

Digital Integrated Circuits

Sequential Circuits

Pseudostatic Two-Phase ET FF
clk1 D P1 X clk2 P3 B I3 P4 clk1 dynamic storage I4 Q

I1

I2

!Q

P2
clk2

master transparent slave hold


clk1

tnon_overlap
clk2
Digital Integrated Circuits2nd

master hold slave transparent


28

Sequential Circuits

Dynamic ET Flipflop
master !clk T
1

slave clk

I1 C

QM

T
2

I2 C

clk

!clk

master transparent slave hold

tsu = tpd_tx thold = zero tc-q = 2 tpd_inv + tpd_tx

clk

!clk

master hold slave transparent


30

Digital Integrated

Circuits2nd

Sequential Circuits

Dynamic ET FF Race Conditions


!clk T
1

clk I1 C

QM

T
2

I2 C

clk

!clk

clk !clk

0-0 overlap race condition toverlap0-0 < tT1 +tI1 + tT2

1-1 overlap race condition toverlap1-1 < thold


Circuits2nd
31

Digital Integrated

Sequential Circuits

Dynamic Two-Phase ET FF
clk1 T
1

clk2 I1 C QM T
2

I2 C

!clk1
master transparent slave hold

!clk2

clk1 tnon_overlap clk2


master hold slave transparent

Digital Integrated

Circuits2nd

32

Sequential Circuits

Pseudostatic Dynamic Latch

Robustness considerations limit the use of dynamic FFs


coupling between signal nets and internal storage nodes can inject significant noise and destroy the FF state leakage currents cause state to leak away with time internal dynamic nodes dont track fluctuations in VDD that reduces noise margins

A simple fix is to make the circuit pseudostatic


!clk

clk

Add above logic added to all dynamic latches


Circuits2nd

Digital Integrated

33

Sequential Circuits

Potrebbero piacerti anche