Professional Documents
Culture Documents
NTUEE C.M. Li
Review
1. what are D-FF, T-FF, JK-FF?
2. please fill in the truth table
Q Q+ | D
Q Q+ | J K
Logic Design
NTUEE C.M. Li
Ch 13
K-map
FF, Comb Logic
NTUEE C.M. Li
Logic Design
Logic Design
NTUEE C.M. Li
Outline
Logic Design
NTUEE C.M. Li
Parity
What is parity?
Why parity?
Logic Design
NTUEE C.M. Li
Fig. 13-1
Logic Design
NTUEE C.M. Li
Waveforms
Assume: Negative edge triggered
Fig. 13-2
Logic Design
NTUEE C.M. Li
State Graph
S0 = total number of 1 inputs received is even
S1 = total number of 1 inputs received is odd
More details later
Fig. 13-3
Logic Design
NTUEE C.M. Li
State Table
Table 13-1
Present
State
Next state
Present
Output (Z)
X=0
X=1
S0
S0
S1
S1
S1
S0
X=0
X=1
X=0
X=1
Fig. 13-4
Logic Design
NTUEE C.M. Li
10
Outline
NTUEE C.M. Li
Logic Design
11
Signal Tracing
What is signal tracing?
How?
Logic Design
NTUEE C.M. Li
12
Logic Design
NTUEE C.M. Li
13
Logic Design
NTUEE C.M. Li
NTUEE C.M. Li
Logic Design
15
Timing Chart
Fig. 13-6
Logic Design
NTUEE C.M. Li
16
Logic Design
NTUEE C.M. Li
17
Fig. 13-7
Logic Design
NTUEE C.M. Li
18
Timing Chart
Fig. 13-8
NTUEE C.M. Li
Logic Design
19
False Output
What is false output?
Logic Design
NTUEE C.M. Li
20
X=1
A=0 0
B=0 1
Z=1 (0) 1
Logic Design
0
1
1
1
0 (1) 0
1
1
1
NTUEE C.M. Li
0
0
21
FFT
Q: Since Mealy circuits have false outputs, why do we need Mealy?
Logic Design
NTUEE C.M. Li
22
Outline
NTUEE C.M. Li
Logic Design
23
State table
The table that describe the relationship of the present state and
next state
Of course the output can also be described
Aka transition table
State Graph
The graph that describe the relationship of the present state and
next state
Logic Design
NTUEE C.M. Li
24
2 next-state equation
3. next-state map
4. state table
5. state graph
Logic Design
25
NTUEE C.M. Li
Review
Characteristic equations (CH 11)
Q+ = S + RQ (SR=0)
Q+ = GD + GQ
Q+ = D
Q+ = DCE + Q CE
Q+ = JQ + KQ
Q+ = T Q = TQ + TQ
Logic Design
NTUEE C.M. Li
(13-1)
(13-2)
(13-3)
(13-4)
(13-5)
(13-6)
26
Moore Example
Fig 13-5
DB =
B+=
Fig 13-5
27
NTUEE C.M. Li
Logic Design
4. State Table
State Table 13-2(b)
AB
X=0
A+ B+
X=1
00=S0, 01=S1
11=S3,10=S3
PS
X=0
NS
X=1
00
10
01
S0
S3
S1
01
00
11
S1
S0
S2
11
01
11
S2
S1
S2
10
11
01
S3
S2
S1
Logic Design
NTUEE C.M. Li
28
5. State graph
TABLE 13-2 (b)
Fig 13-9
PS
NS
X=0
X=1
S0
S3
S1
S1
S0
S2
S2
S1
S2
S3
S2
S1
29
NTUEE C.M. Li
Logic Design
Mealy Example
1. input equation
JA=
JB=
KA=
KB=
2. next-state equation
A +=
B +=
output equation
Z=
Logic Design
NTUEE C.M. Li
Fig. 13-10
30
3. next-state map
Output map
31
NTUEE C.M. Li
Logic Design
4. State Table
State Table 13-3 (b)
A+ B+
AB
X=0
X=1
Z
X=0 =1
S0
S0
S1
S1
S1
S2
S2
S2
S0
S3
S3
S1
X=0
X=1
Z
X=0 =1
00
00
01
01
01
11
11
11
00
10
10
01
Logic Design
PS
NTUEE C.M. Li
NS
32
5. State Graph
Fig 13-11
PS
NS
X=0
X=1
Z
X=0 =1
S0
S0
S1
S1
S1
S2
S2
S2
S0
S3
S3
S1
X
Z
33
NTUEE C.M. Li
Logic Design
Mealy
PS
X=0
NS
X=1
PS
NS
X=0
X=1
Z
X=0 =1
S0
S3
S1
S0
S0
S1
S1
S0
S2
S1
S1
S2
S2
S1
S2
S2
S2
S0
S3
S2
S1
S3
S3
S1
Logic Design
NTUEE C.M. Li
34
Mealy
X
X
NTUEE C.M. Li
Logic Design
35
Fig. 13-12
Logic Design
NTUEE C.M. Li
36
Parallel Adder
Fig 4-3
All inputs are fed simultaneously in parallel
37
NTUEE C.M. Li
Logic Design
State Table
Fig 13-12 (b)
Logic Design
xi
yi
ci
ci+1
si
NTUEE C.M. Li
38
Timing Chart
Aka. timing diagram
Fig. 13-13
NTUEE C.M. Li
39
State Graph
xi yi / si
w/ carry
w/o carry
Fig. 13-14
Logic Design
NTUEE C.M. Li
40
4-state example
TABLE 13-4
Present
State
Next State
X1X2
=00
01
10
S0
S3
S2
S1
S0
S2
S3
Logic Design
Present Output(Z1Z2)
11
X1X2
=00
01
10
11
S1
S0
00
10
11
01
S1
S2
S3
10
10
11
11
S3
S0
S1
S1
00
10
11
01
S2
S2
S1
S0
00
00
01
01
NTUEE C.M. Li
41
4-state example
Fig. 13-15
Logic Design
NTUEE C.M. Li
42
FFT
When do you need serial adders?
Logic Design
NTUEE C.M. Li
43
Outline
Logic Design
NTUEE C.M. Li
44
f(X, Q)
Z = f(X, Q) output
Q+ = g(X, Q) next state
g(X, Q)
Fig. 13-17
Logic Design
45
NTUEE C.M. Li
g(X,Q)
f(Q)
Fig. 13-19
Logic Design
NTUEE C.M. Li
46
Comparison
Moore Circuits
Logic Design
47
NTUEE C.M. Li
Review, CH11
Setup time (tsu)
Fig. 11-16
Logic Design
NTUEE C.M. Li
48
CH 11
Logic Design
NTUEE C.M. Li
49
Outline
Logic Design
NTUEE C.M. Li
50
P 406
1. state change occurs AFTER active clock edge
2. input stable immediately BEFORE and AFTER active clock edge
3. Moore: output change only when state change
Mealy: output change whenever input change
4. Mealy has false outputs
5. How to use state table to draw Mealy outputs?
a. Draw Present State (PS)
b. Draw Next State (NS)
c. Use NS and OLD input to draw false output
d. Use NS and NEW input to draw real output
6. Mealy: read output just BEFORE active edge
Logic Design
51
NTUEE C.M. Li
This is a
simplified
version of Fig
13-6
ABD
B is new state +
old input
D is new state +
new input
Logic Design
New state
New state
Old input
New input
NTUEE C.M. Li
52
Continued from
last figure
X changes
at time C
ABCD
Logic Design
NTUEE C.M. Li
53
NTUEE C.M. Li
54
Continued from
last figure
DEF
Logic Design
Apply input
right before
clock edges
X=010
Observe output
right before
clock edges
Z=110
0
1
1
1
NTUEE C.M. Li
Logic Design
0
0
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