Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
NTUEE C.M. Li
Logic Design
NTUEE C.M. Li
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary
NTUEE C.M. Li
Logic Design
Sequential Circuits
Combinational circuits
Outputs depend on the present input only
Sequential Circuits
Outputs depends on not only the present input
But also the past sequence of inputs
Q: examples of sequential circuits?
Logic Design
NTUEE C.M. Li
Feedback
Output of a circuit feeds to its own input
Example
One inversion
Results in oscillation
Fig. 11-1
Logic Design
NTUEE C.M. Li
Feedback (2)
Two inversion
Fig. 11-2
Logic Design
NTUEE C.M. Li
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
NTUEE C.M. Li
Logic Design
Set-Reset Latch
S=Set; R=Reset; Q = output
S=1, R=0 Q=1
S=0, R=0 Q=stable state
Fig. 11-3
Logic Design
NTUEE C.M. Li
SR Latch (2)
S=0, R=1 Q=0
S=0, R=0 Q= sable state
Fig. 11-4
Logic Design
NTUEE C.M. Li
SR Latch (3)
Drawn in cross-coupled form
Fig. 11-5
Logic Design
NTUEE C.M. Li
10
Fig. 11-6
11
NTUEE C.M. Li
Logic Design
Timing Diagram
Fig 11-7
is delay
Fig. 11-7
Logic Design
NTUEE C.M. Li
12
SR Latch Operation
Table 11-1
Present State
S(t)
0
0
0
0
1
1
1
1
Q = Q(t)
Next State
Q+ = Q(t+ )
Next-state equation
Q+ = S+RQ
Aka. Characteristic equation
Present output
P=SQ
Next state Q+
R(t)
0
0
1
1
0
0
1
1
Q(t)
0
1
0
1
0
1
0
1
Present output P
SR
00
SR
01
SR
11
SR
10
SR
00
SR
01
SR
11
SR
10
Logic Design
Q(t+)
0
1
0
0
1
1
-
NTUEE C.M. Li
Table. 11-1
13
Kmap for Q+
Fig. 11-8
Logic Design
NTUEE C.M. Li
14
Application of SR Latch
Switch debouncing
Double throw switch
One end is R
One end is S
Fig. 11-9
Logic Design
NTUEE C.M. Li
15
Fig. 11-10
Logic Design
NTUEE C.M. Li
16
Q+
Fig. 11-10
Logic Design
NTUEE C.M. Li
17
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
Logic Design
NTUEE C.M. Li
18
Gated D Latch
D=Data input
G = gate input
When G=1
Latch is transparent
When G=0
Output Q remains unchanged
Fig 11-11
Fig. 11-11
19
NTUEE C.M. Li
Logic Design
Fig 11-12
G
Q+
Logic Design
NTUEE C.M. Li
20
K Map
Fig 11-12
K map
Characteristic eq.
Q+ = GQ+GD
Fig. 11-12
Logic Design
NTUEE C.M. Li
21
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
Logic Design
NTUEE C.M. Li
22
Logic Design
23
?
=
Logic Design
NTUEE C.M. Li
24
NTUEE C.M. Li
Fig. 11-13 ( c )
25
Timing Diagram
Negative-edge triggered D-FF
Fig. 11-14
Logic Design
NTUEE C.M. Li
26
Fig. 11-15
NTUEE C.M. Li
Logic Design
27
Fig. 11-16
Logic Design
NTUEE C.M. Li
28
Example Circuit
Fig 11-17
Tsu = 3ns
Tp = 5ns
Td = 2ns (inverter)
Th not used in example
Logic Design
NTUEE C.M. Li
29
Logic Design
0 1 2 3NTUEE
4 C.M.
5 6Li 7 8 9
30
0 1 2
Logic Design
3 4 5 6 7 8 9
10 11 12 13 14 15
NTUEE C.M. Li
31
Logic Design
0 1 2 3 NTUEE
4 5 C.M.
6 Li7 8 9 10
32
Logic Design
NTUEE C.M. Li
33
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
Logic Design
NTUEE C.M. Li
34
Fig. 11-18
Logic Design
NTUEE C.M. Li
35
Master-Slave Flip-Flop
Fig 11-19
Logic Design
NTUEE C.M. Li
36
Logic Design
NTUEE C.M. Li
37
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
Logic Design
NTUEE C.M. Li
38
J-K FF
JK FF is extended version of SR FF
J~S; K~R
J=K=1 is allowed
Truth table (Fig 11-20 b)
Characteristic equation
Q+ = JQ+KQ
If Q=0, J=1, then Q+=1
If Q=1, K=1, then Q+=0
J
0
0
0
0
1
1
1
1
K
0
0
1
1
0
0
1
1
Q
0
1
0
1
0
1
0
1
Q+
0
1
0
0
1
1
1
0
39
NTUEE C.M. Li
Logic Design
Timing Diagram
Fig 11-20 , positive-edge trigger
tp = propagation time
Logic Design
Fig. 11-20
NTUEE C.M. Li
40
Master-Slave JK FF
Very similar to SR FF
Feedback from Q to input
S and R inputs are never high at same time
S1=JQClk
R1=KQClk
Q changes on rising edge
Logic Design
NTUEE C.M. Li
41
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
Logic Design
NTUEE C.M. Li
42
T Flip-Flop
Aka Toggle flip-flop
Truth table (Fig 11-22 b)
Characteristic eq.
Q+ = TQ+TQ=T XOR Q
Symbol
Q+
Logic Design
43
Timing Diagram of T FF
Fig 11-23
tp = propagation time
Fig. 11-23
Logic Design
NTUEE C.M. Li
44
(a): Use JK FF
(b): use D FF
Logic Design
NTUEE C.M. Li
45
FFT
What is wrong with Fig 11-24(b)?
Logic Design
NTUEE C.M. Li
46
Outline
Introduction.
Set-Reset Latch.
Gated D Latch.
Edge-Triggered D Flip-Flop.
S-R Flip-Flop.
J-K Flip-Flop.
T Flip-Flop.
Flip-Flops with Additional Inputs.
Summary.
Logic Design
47
NTUEE C.M. Li
Fig. 11-25
Logic Design
CK
PreN
ClrN Q+
Not allow
1 preset
0 clear
0,1,
No
change
48
Fig. 11-26
Logic Design
NTUEE C.M. Li
49
Clear and preset wont take effect until active clock edge occurs
preN
clk
Q
Asynchronous
preN
clk
Q
Logic Design
NTUEE C.M. Li
50
Gated Clock
Mission
Design a flip-flop that holds data for two clock periods
How?
Gated clock may be a solution
En=1; FF is clocked
En=0; FF is not clocked
Synchronization problems of gated clock
1 gate delay of AND induced clock skew
2. hazards in En cause wrong operation
Clock is very sensitive and be careful when you play trick on it!
Fig. 11-27
Logic Design
NTUEE C.M. Li
51
Better Design
Insert MUX
When CE = 0; FF not changed
When CE=1, FF changes
No synchronization problem
Fig 11-27
Logic Design
NTUEE C.M. Li
52
FFT
Q: we consider hazard on En as synchronization problem
Logic Design
53
NTUEE C.M. Li
Summary
Many types of memory elements introduced today
Flip-flops
Latches
Two stable states
0/1
They are called bistables in some books
Char. Equations
11-1 to 11-6
(S-R latch or flip-flop )
Q+ = S + RQ (SR=0)
(gated D latch )
Q+ = GD + GQ
+
(D flip-flop )
Q =D
(D-CE flip-flop )
Q+ = DCE + Q CE
(J-K flip-flop )
Q+ = JQ + KQ
(T flip-flop )
Q+ = T Q = TQ + TQ
Logic Design
NTUEE C.M. Li
(11-1)
(11-2)
(11-3)
(11-4)
(11-5)
(11-6)
54
NTUEE C.M. Li
Logic Design
55
Next Time
ch 9 Multiplexers Decoders and PLD
ch 11 Latches and FF
ch 12 Registers and Counters
ch 13 Analysis of Clock Sequential Ckts
ch 14 Derivation of State Graphs and
Tables
ch 16 Sequential Ckt Design
ch 18 Ckts for Arith. Operations
final exam
Logic Design
NTUEE C.M. Li
56