09 ISD 2024-25 Part3 TP1 FlipFlops
09 ISD 2024-25 Part3 TP1 FlipFlops
2
Sequential Circuit Example
Next
+1 Volume Memory
0 +
Element Current
-1
Volume
Down Up
?
Button Button
Enable
Periodic
Update
3
Introduction
• Combinational logic circuit
– Is one whose outputs depend only on its current inputs
• Sequential logic circuit
– Is one whose outputs depend not only on its current
inputs, but also on the past sequence of inputs, possibly
far back in time
• State of a sequential circuit
– Is a collection of state variables whose values at any one
time contain all the information about the past, necessary
to account for the circuit’s future behavior
• N-bit state variable: 2N maximum number of states
4
Clock Signals
• State changes of most Next
+1
sequential circuits occur 0 +
Volume Memory
Element Current
-1
at times specified by a Volume
Down Up
free-running clock signal Button
?
Button
Enable
clock signals
5
Bistable Element (Basic Structure)
• No inputs and therefore no way of controlling
or changing its state (random set at power up)
• Only illustrative but serves the basis for more
complex and useful memory elements
6
Bistable Element (Analog Analysis)
9
S-R Latch
(Operation/Timing Diagrams)
10
S-R Latch
Theoretical
(State Diagram)
SR=00,01 SR=00,10
SR=10
QQ QQ
01 SR=01 10
SR=01 SR=10 Real
SR=11 SR=00,01 SR=00,10
SR=10
QQ QQ QQ
SR=11 00 SR=11 01 SR=01 10
SR=00 SR=00 SR=01 SR=10
SR=11
SR=01 SR=10
QQ
SR=11 00 SR=11
QQ
11 SR=00 SR=00
11
S-R Latch
(Characteristic Equation)
Real
SR=00,01 SR=00,10
SR=10
QQ QQ
01 SR=01 10
SR=01 SR=10 SR
SR=11 Q 00 01 11 10
0 0 0 X 1
QQ 1 1 0 X 1
SR=11 00 SR=11
Q+= S + Q.R
SR=00 SR=00
12
S-R Latch (Symbol)
13
S-R Latch (Timing Parameters)
• tpLH – propagation time LOW-to-HIGH
• tpHL – propagation time HIGH-to-LOW
• Tpw(min) – minimum pulse width
14
S-R Latch (with NAND Gates)
15
S-R Latch with Enable (C)
16
S-R Latch with Enable (Operation)
17
D Latch (Structure and Operation)
18
D Latch
(State Diagram and Characteristic Equation)
D
D=0 D=1 Q 0 1
D=1
0 0 1
QQ QQ
01 D=0 10 1 0 1
Q+= D
19
D Latch (Timing Parameters)
• tpLH – propagation time LOW-to-HIGH
• tpHL – propagation time HIGH-to-LOW
• tsetup – setup time
• thold – hold time
20
Application Example of an S-R Latch
Debounce mechanical switches
+Vcc When When
moved to B moved to A
+Vcc
When B
moved to B Q
B +Vcc B
Q
A GND A
GND A
+Vcc
21
Latch Limitations/Issues
D
Q
C
Current Volume
Next Volume
Next Latch
+1 Volume Based
0 +
Memory Current D
-1 Q
Element Volume C
Down Up
? D
Button Button Q
C
Enable
Update
22
Possible Solution? Unfeasible!
Next Latch
+1 Volume Based
0 +
Memory Current
-1
Element Volume
Down Up
?
Button Button
Enable
Update
Next Flip-flop
+1 Volume Based
0 +
Memory Current
-1
Element Volume
Down Up
?
Button Button
(Periodic)
Clock
24
Positive-edge-triggered D Flip-flop
• Latches are not used frequently but are a building block for flip-flops
25
Clock Signals (revisited)
26
Positive-edge-triggered D Flip-flop
(Functional Behavior / Operation)
27
Positive-edge-triggered D Flip-flop
(Timing Behavior)
• tpLH – propagation time LOW-to-HIGH
• tpHL – propagation time HIGH-to-LOW
• tsetup – setup time
• thold – hold time
28
Negative-edge-triggered D Flip-flop
29
Positive-edge-triggered D Flip-flop
with Preset and Clear
30
Positive-edge-triggered D Flip-flop
(7474 Commercial Integrated Circuit)
• 6 gates instead of 8
gates + inverters
• To be analyzed later…
31
Positive-edge-triggered D Flip-flop
with Enable
Mux 2:1
32
Exercise
• Design the complete logic diagram of the volume
control system based on positive-edge-triggered D Flip-
flops with enable (assume 16 levels of volume).
• Component budget
– Flip-flops
Next Flip-flop
– Adder +1 Volume Based
0 +
– Mux 2:1 -1
Memory
Element
Current
Volume
– Logic gates Down
?
Up
Button Button
(Periodic)
Clock
• From the usability point of view, what
could be the clock frequency?
• How to force a predefined volume Periodic updates triggered by
level (e.g. half scale) at power up? one of the edges (rising or
falling) of a clock signal
33
Conclusion
• At the end of this lecture and corresponding lab, it is fundamental
to know and understand the structure, operation and timing
behavior of basic sequential logic circuits (latches and flip-flops)
• Plan for the next lectures
– Analysis of sequential circuits (Finite State Machines) and timing
aspects
– Synthesis of sequential circuits (Finite State Machines)
– Standard sequential circuits
• Registers and shift registers
• Counters
– Iterative vs. sequential circuits
34