Professional Documents
Culture Documents
Mano 4 PDF
Mano 4 PDF
Inputs Outputs
Combinational Next
circuit state Storage Present
elements state
0 0
•
tpd • • •
1t 1t
(b) 2 pd 2 pd
tpd
(a) (d)
1 1
•
tpd
(c)
Inputs Outputs
Combinational
circuit
Flip-flops
Clock pulses
R (Reset) S R Q Q
• • Q
1 0 1 0
Set state
0 0 1 0
0 1 0 1
0 0 0 1 Reset state
S (Set)
• • Q 1 1 0 0 Undefined
i S Cs
i R Cs
o Q Cs
o Q_B
S (Set) S R Q Q
• • Q
0 1 1 0
Set state
1 1 1 0
1 0 0 1
1 1 0 1 Reset state
R (Reset)
• • Q 0 0 1 1 Undefined
C S R Next state of Q
S
• • • Q 0 X X No change
1 0 0 No change
C • 1 0 1 Q = 0; Reset state
1 1 0 Q = 1; Set state
• • • Q 1 1 1 Undefined
R
D • S
• • • Q
C •
• • • Q
• R
C D Next state of Q
0 X No change
1 0 Q = 0; Reset state
1 1 Q = 1; Set state
C • •
D TG • • • Q
• •
•
TG • Q
• •
Y
S S S Q
C • C C
Y
R R
• R
• Q
•
Fig. 4-10 SR Master-Slave Flip-Flop
iC Cs
iS Cs
iR Cs
oY
oQ
Fig. 4-11 Logic Simulation of a Master-Slave Flip-Flop
S S • Q
J
C • C C
K
R • R • • Q
•
(a)
Next State
J K of Q
0 0 Q
0 1 0
1 0 1
1 1 Q
(b)
D D S Q
C
• • C
• R
• Q
•
Fig. 4-13 D-Type Positive Edge-Triggered Flip-Flop
J D S • Q
C • C
K • • C • R
• • Q
•
Fig. 4-14 Positive Edge-Triggered JK Flip-Flop
S • S D D
R • • R
• C
• • C
•
SR SR D with 1 Control D with 1 Control
(a) Latches
S S J J
C
• C C
• C
R • R • K • K •
Triggered SR Triggered SR Triggered JK Triggered JK
D D J J
C • C
C • • C • K • K •
Triggered D Triggered D Triggered JK Triggered JK
TABLE 4-1
Flip-Flop Characteristic Tables
J K Q (t ⫹ 1) Operation S R Q (t ⫹ 1) Operation
D Q (t ⫹ 1) Operation T Q (t ⫹ 1) Operation
S R C J K Q Q
• S
1J Q
0
1
1
0
X
X
X
X
X
X
1 0
0 1
0 0 X X X Undefined
C1
→→→→
1 1 0 0 No change
1K
• Q 1
1
1
1
0
1
1
0
0 1
1 0
• R 1 1 1 1 Complement
X
B •
J A
Y • •
C
C •
• K • A
Clock
Fig. 4-17 Implementing Input Equations
•
X •
D • A
• C
• A
D • B
•
• C
B
Clock
•
Fig. 4-18 Example of a Sequential Circuit
© 2001 Prentice Hall, Inc.
M. Morris Mano & Charles R. Kime
LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated.
4-20
TABLE 4-2
State Table for Circuit of Figure 4-18
A B X A B Y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 1
0 1 1 1 1 0
1 0 0 0 0 1
1 0 1 1 0 0
1 1 0 0 0 1
1 1 1 1 0 0
TABLE 4-3
Two-Dimensional State Table for the Circuit in Figure 4-
18
A B A B A B Y Y
0 0 0 0 0 1 0 0
0 1 0 0 1 1 1 0
1 0 0 0 1 0 1 0
1 1 0 0 1 0 1 0
Table 4-3 Two-Dimensional State Table for the Circuit in Figure 4-18
A
X D • Z
Y C
•
Clock
(a)
Present Next
state Inputs state Output
A X Y A Z
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 0
1 0 0 1 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
(b) State table
TABLE 4-4
State Table for Circuit with JK Flip-Flops
A B X A B JA KA J B KB
0 0 0 0 1 0 0 1 0
0 0 1 0 0 0 0 0 1
0 1 0 1 1 1 1 1 0
0 1 1 1 0 1 0 0 1
1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 0 0 0
1 1 0 0 0 1 1 1 1
1 1 1 1 1 1 0 0 0
0/0 1/0
00 01
0/1
(a) (b)
Fig. 4-20 State Diagrams
(a) (b)
(c)
0/0 1/0
1/1
0/0
0/0
(d)
TABLE 4-5
State Table for State Diagram in Figure 4-21
A A B 0 0
B A C 0 0
C D C 0 0
D A B 0 1
TABLE 4-6
Sequence Tables for Code Converter Example
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0
1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1
0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0
1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0
0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1
1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0
0 1 1 0 1 0 0 1 1 0 0 1 0 0 1 1
1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1
0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0
1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 1
(b)
Init Init
0/0 or 1/1
0/1 1/0
1/0
0/1
(c) (d)
TABLE 4-7
Table 4-5 with Names Replaced by Binary Codes
00 00 01 0 0
01 00 11 0 0
11 10 11 0 0
10 00 01 0 1
TABLE 4-8
State Table for Design Example
A B X A B Y
0 0 0 0 0 0
0 0 1 0 1 1
0 1 0 1 0 0
0 1 1 0 1 0
1 0 0 1 0 0
1 0 1 1 1 1
1 1 0 1 1 0
1 1 1 0 0 0
0/0
00
1/1 1/0
0/0
1/0 01 11
0/0 1/1
10
0/0
Fig. 4-23 State Diagram for Design Example
BX B BX B BX B
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 1 0 1 1 0 1
A 1 1 1 1 A 1 1 1 A 1 1
X X X
DA = AB + BX DB = AX + BX + ABX Y = BX
•
D • A
C
X • • • • • A
•
•
• D • B
• C
• • B
Clock
Y
Fig. 4-25 Logic Diagram for Sequential Circuit with D Flip-Flops
TABLE 4-9
State Table for Second Design Example
A B C X A B C
0 0 1 0 0 0 1
0 0 1 1 0 1 0
0 1 0 0 0 1 1
0 1 0 1 1 0 0
0 1 1 0 0 0 1
0 1 1 1 1 0 0
1 0 0 0 1 0 1
1 0 0 1 1 0 0
1 0 1 0 0 0 1
1 0 1 1 1 0 0
CX C
AB 00 01 11 10
00 X X X X 1 X X 1
01 1 1 1 1 1
B
11 X
X X X X X X X X X X X
A
10
1 1 1 1 1
DA = AX + BX + BC DB = AC X + ABX DC = X
TABLE 4-10
Flip-Flop Excitation Tables
Q (t ) Q (t ⫹ 1) J K Q (t ) Q (t ⫹ 1) S R
0 0 0 X 0 0 0 X
0 1 1 X 0 1 1 0
1 0 X 1 1 0 0 1
1 1 X 0 1 1 X 0
Q (t) Q (t ⫹ 1) D Q (t) Q (t ⫹ 1) T
0 0 0 0 0 0
0 1 1 0 1 1
1 0 0 1 0 1
1 1 1 1 1 0
TABLE 4-11
State Table with JK Flip-Flop Inputs
A B X A B JA KA JB KB
0 0 0 0 0 0 X 0 X
0 0 1 0 1 0 X 1 X
0 1 0 1 0 1 X X 1
0 1 1 0 1 0 X X 0
1 0 0 1 0 X 0 0 X
1 0 1 1 1 X 0 1 X
1 1 0 1 1 X 0 X 0
1 1 1 0 0 X 1 X 1
BX B BX B
A 00 01 11 10 A 00 01 11 10
0 1 0 X X X X
A 1 X X X X A 1 1
X X
JA = BX KA = BX
BX B BX B
A 00 01 11 10 A 00 01 11 10
0 1 X X 0 X X 1
A 1 1 X X A 1 X X 1
X X
JB = X KB = AX + AX
=A X
Fig. 4-27 Maps for J and K Input Equations
AND2
FJKC
X
INV
A
AND2
AND2
INV
FJKC
XNOR2
CLK
R: 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0
X: 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0
A: X X 0* 0 0 0 1 1 1 1 0 0 1 1 0* 0
B: X X 0* 0 1 1 0 0 1 1 0 1 0 1 0* 0
Y: 0 0 0* 1 0 0 0 1 0 0 1 0 1 0 0* 0
* These responses are asynchronous with the clock and thus do not w ait for the next positive
clock edge.
(a) Circuit test and expected results
0.0 20ns 40ns 60ns 80ns 100ns 120ns 140ns 160ns 180ns 200ns 220ns 240ns 260ns 280ns
i CLK Cs
iR Cs
iX Cs
oA
oB
oY
Fig. 4-29 Logic Simulation Verification for the Circuit in Figure 4-28
begin
process (CLK, RESET)
begin
if (RESET = '1') then
Q <= '0';
elsif (CLK'event and CLK = '1') then
Q <= D;
end if;
end if;
end process;
end;
Fig. 4-30 VHDL Process Description of Positive Edge-Triggered Flip-Flop with Reset
TABLE 4-12
Illustration of generation of storage in VHDL
Inputs Action
TABLE 4-13
Illustration of generation of storage in Verilog
Inputs Action
posegdge RESET
and RESET = 1 posedge CLK