sequential logic - ece:course page

13
Sequential Logic Lecture 9 18-322 Fall 2003 Textbook: [Sections 7.1 7.2] Overview The third dimension: Sequential systems `Memory function Static (positive feedback) Dynamic `Memory elements Latches Flip-Flops Thursday: Clocking disciplines

Upload: others

Post on 16-Jan-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sequential logic - ECE:Course Page

1

Sequential Logic

Lecture 918-322 Fall 2003

Textbook: [Sections 7.1 7.2]

Overview

The third dimension: Sequential systemsMemory function ⌧Static (positive feedback)⌧Dynamic

Memory elements ⌧Latches ⌧Flip-Flops

Thursday: Clocking disciplines

Page 2: Sequential logic - ECE:Course Page

2

Positive Feedback: Bistability

V1

V2

V3

V2

V1 V2 V3a a

V1 = V3

V2

A

B

C

a a

VDD

Only A and B are stable operation points

Meta-stability

V1 = V3

V2C

If gain of inverter > 1C is meta-stable pointCircuit cannot remain at C

metastable

0 1

A

Page 3: Sequential logic - ECE:Course Page

3

How to use Bi-stability

Now we know how store a bit (bi-stability)How can we manipulation (write) that bit

Solution 1: Interrupt the feedback Solution 2: Overpower the feedback loop (force it into another state)

Next we’ll see mostly Solution 1

SR Latch

QS

R Q

S R Q Q

0101

0011

Q100

Q010

QS

R Q

S R Q Q

1010

1100

Q101

Q011

© Prentice Hall 1995

S

R

Q

Q

S

R

Q

Q

Shows that it operates on negative logic (negative-going pulse)

Logically Interrupting the feedback loop

Page 4: Sequential logic - ECE:Course Page

4

JK Flip-Flop

QJ

K Q

Jn Kn Qn+1

0011

0101

Qn01Qn

(b)

(c)

S

R

Q

Q Q

J

K

φ

Q

(a)φ

© Prentice Hall 1995

Two improvements to the SR:1. No “illegal inputs”, state of Q influences which input is enabled2. Introduction of clock signal (only change state when high)

Other Flip-Flops

QJ

K Qφ

T

φQJ

K Qφφ

D

Q

T

Toggle Flip-Flop

© Prentice Hall 1995

Q

D

Delay Flip-Flop

a.k.a. D transparent latch

Page 5: Sequential logic - ECE:Course Page

5

D Latch

Equivalent circuit

D

Φ

0

1Q

The Race Problem

Q

D

1

t

t

tloop

φ

© Prentice Hall 1995

D

Signal can race around during φ = 1

Page 6: Sequential logic - ECE:Course Page

6

Race Fixes: Master-Slave Flip-Flop

S

R

Q

Q Q

QS

R

Q

Q

J

K

φ

MASTER SLAVE

QJ

K Qφ

PRESET

CLEAR

SI

RI

© Prentice Hall 1995

One-catching!(The circuit is sensitive to input changes while φ = 1)

FF operates at the falling edge of the clock

= 1

1

1= 0

0

1

Needs 38 transistors to implement!

Race Fixes: Master-Slave

Comb.Logicf1()

SComb.Logicf2()

M SM

Comb.Logicf1()

SComb.Logicf2()

M SM

Comb.Logicf1()

SComb.Logicf2()

M SM

Master: ClosedSlave: Transparent

Master: TransparentSlave: Closed

Master: ClosedSlave: Transparent

Page 7: Sequential logic - ECE:Course Page

7

Race Fixes: Edge Triggering #1

φ

In

X

Out

tpLH

© Prentice Hall 1995

φ

In XN2N1

Out

Edge-Triggered FF #2

QJ

KQ

© Prentice Hall 1995

φ

S

R

Q

Q

Q

J

K

QJ and K are sampled at the low-going edge of φand generate short pulses on S and R

Negative edge-triggered FF

Page 8: Sequential logic - ECE:Course Page

8

Single-Phase Clock: Parameters of Interest

data

clk

Q

clk-to-Q (propagation) delay (tpFF)

hold time

setup time

cycle time

Unstable data

Maximum Clock Frequency

F F’s

LOGIC

tp,comb

φ

tp,FF + tp,comb + tsetup < T

Page 9: Sequential logic - ECE:Course Page

9

Overview

The third dimension: Sequential systemsMemory function ⌧Static (positive feedback)⌧Dynamic

Memory elements ⌧Latches ⌧Flip-Flops

SR Flip-Flop

VDD

Q

Q

RS

φφM1 M3

M4M2

M6

M5 M7

M8

© Prentice Hall 1995

= 10 =

= 1

Ratioed logic

A master-slave D-FF implementation based on this structure would require only 22 (10+10+2) transistors!

Page 10: Sequential logic - ECE:Course Page

10

6-Transistor CMOS SR-Flip Flop

VDD

QQ

φ

M1 M3

M4M2

M5R

φ

S

Very popular in static memories!Solution 2: Overpowering the feedback loop

D-latch(1)

D

Q

QQQ

VDD

D

Page 11: Sequential logic - ECE:Course Page

11

D-latch(2)

C

C

Q

Q

D

C C

D

C

Q

Q

C = 0

=0

D-latch(3)

C

QD

C Make this really weakTherefore D input overpowers

feedback

How to make weak inverter:W/L: Make W small or make L large

Page 12: Sequential logic - ECE:Course Page

12

D Flip-Flop (Master-Slave)

D

ΦΦ

Q

Q

Φ (Controls operation & provides synchronization)Φ

Φ

t0

1

Load Master Transfer to Slave

D

Q

Q

Φ

Master Slave

DFF (Clear and Set)

D

Φ Φ

ΦΦ

Set

Clear

Q

Q

Set = 1: Clear = 1 (AND2 -> NOT same as the previous circuit)Clear = 0 (Q = 1)

Set = 0: Clear = 1 (Q = 1)Clear = 0 forbidden!

Page 13: Sequential logic - ECE:Course Page

13

DFF (Load Control)

D

Φ Φ

Q

Q

ΦΦ

Load

master slave

φ⋅Load

WARNING: This is now dynamic logic! We’ll talk about that later

Registers with DFFs

D1 Q

Φ[0]

[1]Φ

D2 Q

Dn-2 Q

Φ[n-2]

[n-1]Φ

Dn-1 Q

:

Q

[0]

[1]

Q

[n-1]

Φ

Q

:

Combinationallogic

Primary outputs

Primary inputs

Present state

Next state

Huffman model of FSMs