Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructor: Alexander Stoytchev

Similar presentations


Presentation on theme: "Instructor: Alexander Stoytchev"— Presentation transcript:

1 Instructor: Alexander Stoytchev
CprE 281: Digital Logic Instructor: Alexander Stoytchev

2 D Flip-Flops CprE 281: Digital Logic Iowa State University, Ames, IA
Copyright © Alexander Stoytchev

3 Administrative Stuff The second midterm is next week.
No homework is due next week. You’ll still have labs though 

4 Administrative Stuff Midterm Exam #2 When: Monday October 28.
Where: This classroom What: Chapters 1, 2, 3, 4 and The exam will be open book and open notes (you can bring up to 3 pages of handwritten notes).

5 Midterm 2: Format The exam will be out of 130 points
You need 95 points to get an A It will be great if you can score more than 100 points. but you can’t roll over your extra points 

6 Midterm 2: Topics Binary Numbers and Hexadecimal Numbers
1’s complement and 2’s complement representation Addition and subtraction of binary numbers Circuits for adders and fast adders Single and Double precision IEEE floating point formats Converting a real number to the IEEE format Converting a floating point number to base 10 Multiplexers (circuits and function) Synthesis of logic functions using multiplexers Shannon’s Expansion Theorem

7 Midterm 2: Topics Decoders (circuits and function) Demultiplexers
Encoders (binary and priority) Code Converters K-maps for 2, 3, and 4 variables Synthesis of logic circuits using adders, multiplexers, encoders, decoders, and basic logic gates Synthesis of logic circuits given constraints on the available building blocks that you can use Latches (circuits, behavior, timing diagrams) Flip-Flops (circuits, behavior, timing diagrams)

8 Quick Review

9 A simple memory element with NOT Gates
x x x [ Figure 5.2 from the textbook ]

10 A simple memory element with NAND Gates
x

11 A simple memory element with NOR Gates
x

12 Basic Latch

13 A simple memory element with NOR Gates

14 A simple memory element with NOR Gates

15 A simple memory element with NOR Gates
Set Reset

16 A memory element with NOR gates
Reset Set Q [ Figure 5.3 from the textbook ]

17 Two Different Ways to Draw the Same Circuit
[ Figure 5.3 & 5.4 from the textbook ]

18 Circuit and Truth Table for the Basic Latch
Q a b 1 0/1 1/0 (a) Circuit (b) Truth table (no change) [ Figure 5.4a,b from the textbook ] NOR Gate Truth table NOR Gate x1 x2 f 1

19 Timing Diagram for the Basic Latch with NOR Gates
Q Q a b Q a 0/1 1/0 (no change) 1 1 1 1 Q 1 1 b S (a) Circuit (b) Truth table t t t t t t t t t t 1 2 3 4 5 6 7 8 9 10 1 R 1 S 1 Q a ? 1 Q b ? Time [ Figure 5.4 from the textbook ] (c) Timing diagram

20 Gated SR Latch

21 Motivation The basic latch changes its state when the input signals change It is hard to control when these input signals will change and thus it is hard to know when the latch may change its state. We want to have something like an Enable input In this case it is called the “Clock” input because it is desirable for the state changes to be synchronized

22 Circuit Diagram for the Gated SR Latch
[ Figure 5.5a from the textbook ]

23 Circuit Diagram for the Gated SR Latch
This is the “gate” of the gated latch

24 Circuit Diagram for the Gated SR Latch
Notice that these are complements of each other

25 Circuit Diagram and Characteristic Table
for the Gated SR Latch [ Figure 5.5a-b from the textbook ]

26 Circuit Diagram and Graphical Symbol
for the Gated SR Latch [ Figure 5.5a,c from the textbook ]

27 Timing Diagram for the Gated SR Latch
[ Figure 5.5c from the textbook ]

28 Gated SR latch with NAND gates
Clk Q [ Figure 5.6 from the textbook ]

29 Gated SR latch with NAND gates
Clk Q In this case the “gate” is constructed using NAND gates! Not AND gates.

30 Gated D Latch

31 Motivation Dealing with two inputs (S and R) could be messy. For example, we may have to reset the latch before some operations in order to store a specific value but the reset may not be necessary depending on the current state of the latch. Why not just have one input and call it D. The D latch can be constructed using a simple modification of the SR latch.

32 Circuit Diagram for the Gated D Latch
[ Figure 5.7a from the textbook ]

33 Circuit Diagram and Characteristic Table
for the Gated D Latch Note that it is now impossible to have S=R=1. [ Figure 5.7a,b from the textbook ]

34 Circuit Diagram and Characteristic Table
for the Gated D Latch When Clk=1 the output follows the D input. When Clk=0 the output cannot be changed. [ Figure 5.7a,b from the textbook ]

35 Circuit Diagram and Graphical Symbol
for the Gated D Latch [ Figure 5.7a,c from the textbook ]

36 Timing Diagram for the Gated D Latch
[ Figure 5.7d from the textbook ]

37 Setup and hold times t su h Clk D Q Setup time (tsu) – the minimum time that the D signal must be stable prior to the the negative edge of the Clock signal Hold time (th) – the minimum time that the D signal must remain stable after the the negative edge of the Clock signal [ Figure 5.8 from the textbook ]

38 Edge-Triggered D Flip-Flops

39 Motivation In some cases we need to use a memory storage device that can change its state no more than once during each clock cycle.

40 Master-Slave D Flip-Flop
Q Master Slave Clock m s Clk (a) Circuit [ Figure 5.9a from the textbook ]

41 Timing Diagram for the Master-Slave D Flip-Flop
Q Master Slave Clock m s Clk Clock D Q m Q = Q s [ Figure 5.9a,b from the textbook ]

42 Graphical Symbol for the Master-Slave D Flip-Flop
Q [ Figure 5.9c from the textbook ]

43 Graphical Symbol for the Master-Slave D Flip-Flop
Q The > means that this is edge-triggered The small circle means that is is the negative edge [ Figure 5.9c from the textbook ]

44 Negative-Edge-Triggered Master-Slave D Flip-Flop
Q Master Slave Clock m s Clk Positive-Edge-Triggered Master-Slave D Flip-Flop D Q Master Slave Clock m s Clk

45 Negative-Edge-Triggered Master-Slave D Flip-Flop
Q Positive-Edge-Triggered Master-Slave D Flip-Flop D Q

46 Other Types of Edge-Triggered
D Flip-Flops

47 Comparison of level-sensitive and edge-triggered D storage elements
Q Clock a b c Clk Comparison of level-sensitive and edge-triggered D storage elements D Clock Q a b c

48 Comparison of level-sensitive and edge-triggered D storage elements
Q Clock a b c Clk Comparison of level-sensitive and edge-triggered D storage elements Level-sensitive (the output mirrors the D input when Clk=1) D Clock Q a b c

49 Comparison of level-sensitive and edge-triggered D storage elements
Q Clock a b c Clk Comparison of level-sensitive and edge-triggered D storage elements Positive-edge-triggered D Clock Q a b c

50 Comparison of level-sensitive and edge-triggered D storage elements
Q Clock a b c Clk Comparison of level-sensitive and edge-triggered D storage elements Negative-edge-triggered D Clock Q a b c

51 A positive-edge-triggered D flip-flop
Clock P4 P3 P1 P2 5 6 1 2 3 (a) Circuit Q (b) Graphical symbol 4 [ Figure 5.11 from the textbook ]

52 A positive-edge-triggered D flip-flop
This circuit behaves like a positive-edge-triggered D flip-flop, but it uses only 6 NAND gates. Thus, it can be implemented with fewer transistors than the master-slave D flip-flop. D Clock P4 P3 P1 P2 5 6 1 2 3 (a) Circuit Q (b) Graphical symbol 4 [ Figure 5.11 from the textbook ]

53 Master-slave D flip-flop with Clear and Preset
[ Figure 5.12 from the textbook ]

54 Positive-edge-triggered D flip-flop with Clear and Preset

55 Positive-edge-triggered D flip-flop
with Clear and Preset [ Figure 5.13a from the textbook ]

56 Positive-edge-triggered D flip-flop
with Clear and Preset [ Figure 5.13b,c from the textbook ]

57 Flip-Flop Timing Parameters
[ Figure 5.14 from the textbook ]

58 Terminology Basic Latch – is a feedback connection of two NOR gates or two NAND gates, which can store one bit of information. It can be set using the S input and reset to 0 using the R input. Gated Latch – is a basic latch that includes input gating and a control input signal. The latch retains its existing state when the control input is equal to 0. Its state may be changed when the control signal is equal to 1. [ Section 5.7 in the textbook ]

59 Terminology Two types of gated latches
(the control input is the clock): Gated SR Latch – uses the S and R inputs to set the latch to 1 or reset it to 0. Gated D Latch – uses the D input to force the latch into a state that has the same logic value as the D input. [ Section 5.7 in the textbook ]

60 Terminology Flip-Flop – is a storage element that can have its output state changed only on the edge of the controlling clock signal. Positive-edge triggered – if the state changes when the clock signal goes from 0 to 1. Negative-edge triggered – if the state changes when the clock signal goes from 1 to 0. [ Section 5.7 in the textbook ]

61 Terminology The word latch is mainly used for storage elements, while clocked devices are described as flip-flops. A latch is level-sensitive, whereas a flip-flop is edge-sensitive. That is, when a latch is enabled it becomes transparent, while a flip flop's output only changes on a single type (positive going or negative going) of clock edge. [

62 Questions?

63 THE END


Download ppt "Instructor: Alexander Stoytchev"

Similar presentations


Ads by Google