Академический Документы
Профессиональный Документы
Культура Документы
NTUEE C.M. Li
Logic Design
NTUEE C.M. Li
Ch 13
K-map
FF, Comb Logic
Logic Design
NTUEE C.M. Li
Outline
Logic Design
NTUEE C.M. Li
Sequence Detector
Job Statement
Please design a sequence detector that has one input one output
Output =1 when input sequence is 101
Example sequence
X
time
10 11 12 13 14
Fig. 14-1
Logic Design
NTUEE C.M. Li
Design Flow
1. Mealy or Moore?
2. draw state graph
3. Turn state graph to state table
4. K map
5. circuit design
Logic Design
NTUEE C.M. Li
If receive 0, stay in S0
If receive 1, go to S1
Fig. 14-2
NTUEE C.M. Li
Logic Design
Output 1
Go to state S1 (why not S0?)
Fig. 14-3
Logic Design
NTUEE C.M. Li
Fig. 14-4
NTUEE C.M. Li
Logic Design
Graph to Table
State Table
TABLE 14-1
Transition Table
TABLE 14-2
Present
State
Next state
X=0
X=1
X=0
X=1
S0
S0
S1
S1
S2
S1
S2
S0
S1
A +B +
AB
Logic Design
Present Output
X=0
X=1
X=0
X=1
00
00
01
01
10
01
10
00
01
NTUEE C.M. Li
10
Table to K-map
Next-state map
Output map
Fig. 14-5
NTUEE C.M. Li
Logic Design
11
Fig. 14-5
Logic Design
NTUEE C.M. Li
12
Logic Design
NTUEE C.M. Li
13
Fig. 14-5
Logic Design
NTUEE C.M. Li
14
Fig. 14-6
15
NTUEE C.M. Li
Logic Design
X=0
X=1
Present
Output (Z)
S0
S0
S1
S1
S2
S1
S2
S0
S3
S3
S2
S1
TABLE 14-3
Transition table
Present
State
Next state
TABLE 14-4
A +B +
Logic Design
AB
X=0
X=1
00
00
01
01
11
01
11
00
10
10
11
01
NTUEE C.M. Li
16
Table to K-map
Your exercise
17
NTUEE C.M. Li
Logic Design
Moore
Logic Design
Mealy
NTUEE C.M. Li
18
Outline
NTUEE C.M. Li
Logic Design
19
Logic Design
NTUEE C.M. Li
20
Please design a sequence detector that has one input X and one
output Z
Output Z=1 when input sequence 010 or 1001 detected
X
time
1
0
1
1
1
2
1
3
1
4
1
5
1
6
NTUEE C.M. Li
Logic Design
21
State
Sequence
S0
Reset
S1
S2
01
S3
010
Logic Design
NTUEE C.M. Li
22
1001
NTUEE C.M. Li
Logic Design
23
Sequence
S0
Reset
S1
S2
01
S3
10
S4
S5
100
Logic Design
NTUEE C.M. Li
24
Please design a parity detector that has one input and one output
Output = 1 if input sequence is odd parity and at least two
consecutive zeros has been received
Partial state graph
For parity checking
Fig. 14-10
NTUEE C.M. Li
Logic Design
25
Fig. 14-11
Logic Design
NTUEE C.M. Li
26
Before 00
After 00
Fig. 14-12
Logic Design
NTUEE C.M. Li
27
Outline
Logic Design
NTUEE C.M. Li
28
Logic Design
NTUEE C.M. Li
29
Three examples
Example 1. Mealy sequence detector (reset every 4 inputs)
Example 2 . Moore sequence detector (skip)
Example 3. Moore sequence detector (skip)
Logic Design
NTUEE C.M. Li
30
Example 1
Specification:
Fig. 14-13
X
Logic Design
31
State
Sequence
S0
Reset
S1
S2
S3
10 or 01
S4
010 or 100
S5
Two inputs, no
1 output
S6
Three inputs,
no 1 output
Fig. 14-14
Logic Design
NTUEE C.M. Li
32
Example 2
Specification
Design a sequence detector that has one input X and two outputs
Z1 and Z2
Z1 = 1 when input is 100 AND no 010 occurs before
Z2=1 when input is 010
100110010
1010010110100
Z1
001000100
0000000000000
Z2
000000001
0101001000010
NTUEE C.M. Li
Logic Design
33
Fig. 14-15
Logic Design
NTUEE C.M. Li
34
Logic Design
35
NTUEE C.M. Li
Complete Graph
Logic Design
36
Example 3
Self study
Fig. 14-17
Logic Design
NTUEE C.M. Li
37
Outline
Logic Design
NTUEE C.M. Li
38
Clock or no clock
Only one data bit at a time
Fig. 14-18
NTUEE C.M. Li
Logic Design
39
Fig. 14-19
Logic Design
NTUEE C.M. Li
40
Design
Specification
41
NTUEE C.M. Li
Logic Design
1 clock period
NTUEE C.M. Li
42
Design in Mealy
State Graph
State Table
PS
NS
X=0
NS
X=1
Z
X=0
Z
X=1
S0
S1
S2
S1
S0
S2
S0
Logic Design
NTUEE C.M. Li
43
FFT
False output is BAD
Why?
NTUEE C.M. Li
44
Redesign in Moore
Table 14-21 (c)
1 is impossible
0 is impossible
Fig. 14-21 (b)
NTUEE C.M. Li
Logic Design
45
NTUEE C.M. Li
46
FFT
Q1: have you notice any difference between output waveforms of
Logic Design
NTUEE C.M. Li
47
Outline
Logic Design
NTUEE C.M. Li
48
NTUEE C.M. Li
Logic Design
49
Example
Specification
Fig. 14-22
Logic Design
NTUEE C.M. Li
50
Fig. 14-22
Logic Design
NTUEE C.M. Li
51
Final Check
Make sure all input labels on emanating arcs from a state is
complete
i.e. ORing all Boolean expressions equals one
F+FR+FR=1
Make sure no emanating arc overlap
i.e. ANDing every pair of Boolean expressions equals zero
F. FR =0
F. FR=0
FR. FR=0
Logic Design
NTUEE C.M. Li
52
FFT
False output is BAD
Why?
Logic Design
53
Next Time
Logic Design
NTUEE C.M. Li
54