ece 331 – digital system design latches and flip-flops (lecture #17) the slides included herein...

31
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning.

Upload: reina-flemmings

Post on 15-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

ECE 331 – Digital System Design

Latches and Flip-Flops

(Lecture #17)

The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6th Edition, by Roth and Kinney,

and were used with permission from Cengage Learning.

Page 2: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 2

Material to be covered …

Chapter 11: Sections 1 – 7

Page 3: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 3

Brief introductionto

Sequential Logic Circuits

Page 4: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 4

Sequential switching circuits have the property that the output depends not only on the present input but also on the past sequence of inputs.

In effect, these circuits must be able to “remember” something about the past history of the inputs in order to produce the present output.

We say a circuit has feedback if the output of one of the gates is connected back into the input of another gate in the circuit so as to form a closed loop.

Sequential Logic Circuits

Page 5: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 5

Sequential Logic Circuits

CombinationalLogicCircuit Memory

inputsoutputs

Page 6: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 6

Basic Memory Elements

Page 7: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 7

Basic Memory Elements Latch

Clock input is level sensitive. Output can change multiple times during a clock

cycle. Output changes while clock is active.

Flip Flop Clock input is edge sensitive. Output can change only once during a clock

cycle. Output changes on clock transition.

Page 8: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 8

Basic Memory Elements

Both latches and flip flops use feedback to achieve “memory”.

Page 9: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 9

Feedback Circuit with 2 Stable States

What is the problem with this circuit?

Page 10: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 10

Set-Reset (SR) Latch

P

NOR gates

Feedback

Page 11: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 11

SR Latch: Behavior

Page 12: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 12

SR Latch: Behavior

Page 13: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 13

S R Q+

0 0 Q

0 1 0

1 0 1

1 1 Not allowed

• If S = 1 (Set), Q+ = 1

• If R = 1 (Reset), Q+ = 0

• If S = R = 0, Q+ = Q (no change)

• S = R = 1 is not allowed.

SR Latch: Behavior

Page 14: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 14

P ≠ Q′

SR Latch: Improper Operation

Page 15: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 15

SR Latch: Symbolalways complementary

Page 16: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 16

SR Latch: Timing Diagram

Page 17: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 17

SR Latch: Characteristic Equation

Characteristic Equation: Q+ = S + R'.Q (S.R = 0)

Page 18: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 18

SR Latch: using NAND gates

Page 19: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 19

A gated D latch has two inputs – a data input (D) and a gate input (G). The D latch can be constructed from an S-R latch and additional logic gates.

When G = 1, the value of D is passed to Q.

When G = 0, the Q output holds the last value of D (no state change).

This type of latch is also referred to as a transparent latch.

Gated D Latch

Page 20: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 20

Gated D Latch: Circuit and Timing

Page 21: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 21

Gated D Latch: Symbol and Truth Table

No invalid inputs!

Page 22: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 22

Gated D Latch: Characteristic Equation

Characteristic Equation: Q+ = G'.Q + G.D

Page 23: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 23

Gated D Latch: using NAND gates

S'

R'

Page 24: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 24

A D flip-flop has two inputs, D (data) and Ck (clock). The small arrowhead on the flip-flop symbol identifies the clock input. Unlike the D latch, the flip-flop output changes only in response to the clock, not to a change in D.

If the output can change in response to a 0 to 1 transition on the clock input, we say that the flip-flop is triggered on the rising edge (or positive edge) of the clock.

If the output can change in response to a 1 to 0 transition of the clock input, we say that the flip-flop is triggered on the falling edge (or negative edge) of the clock. An inversion bubble on the clock input indicates a falling-edge trigger.

D Flip-Flop (edge-triggered)

Page 25: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 25

Q+ = DCharacteristic Equation

D Flip-Flop

Page 26: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 26

D Flip-Flop: Timing Diagram

Which clock edge is the D flip-flop triggered on?

Page 27: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 27

D Flip-Flop (master-slave)

Page 28: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 28

D Flip-Flop: Timing Diagram

Which clock edge is the D flip-flop triggered on?

Page 29: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 29

D Flip-Flop: Setup and Hold Times

Page 30: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 30

D Flip-Flop: Minimum Clock Period

Page 31: ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals

Fall 2010 ECE 331 - Digital System Design 31

Questions?