Mano 7 PDF
Mano 7 PDF
Control signals
Control Data
outputs inputs
R 7 6 5 4 3 2 1 0
15 0 15 8 7 0
R2 PC (H) PC (L)
K1
Transfer occurs here
Load
t t+1
n
R1 R2 Clock
K1
Clock
TABLE 7-1
Basic Symbols for Register Transfers
TABLE 7-2
Textbook RTL, VHDL, and Verilog Symbols for Register Transfers
Table 7-2 Textbook RTL, VHDL, and Verilog Symbols for Register Transfers
TABLE 7-3
Arithmetic Microoperations
Symbolic
designation Description
R2
n
n
Cn–1 Adder-Subtractor
Select (S) X
• Cn
V C R1 Load • K1
TABLE 7-4
Logic Microoperations
Symbolic
designation Description
TABLE 7-5
Examples of Shifts
Eight-bit examples
R1 4
K2
K1 •
R2
REGISTER
LOAD R0
2 – to – 1 MUX
• C REGISTER
S LOAD
D0 Q0 A0
D1 Q1 C
A1
D2 Q2 A2 Y0 D0 Q0
D3 Q3 A3 Y1 D1 Q1
B0 Y2 D2 Q2
R1 B1 Y3 D3 Q3
REGISTER B2
LOAD B3
Clock • C
D0 Q0
D1 Q1
D2 Q2
D3 Q3
0 S n
2 – to– 1 n
1 MUX
R0 R0
n n
Select
0 S n SS11 S0 n
2 – to– 1 0
1 MUX n
R1 1 3 – to – 1 Bus R1
n MUX
2
0
0 S n n
2 – to– 1
1 MUX
R2 R2
n n
TABLE 7-6
Examples of Register Transfers Using the Single Bus
in Figure 7-6(b)
Select Load
Register Transfer S1 S0 L2 L1 L0
R0 ← R2 1 0 0 0 1
R0 ← R1 , R2 ← R1 0 1 1 0 1
R0 ← R1 , R1 ← R0 Impossible
Table 7-6 Examples of Register Transfers Using the Single Bus in Figure 7-6(b)
Load Load
L0 L1 L2 L2 L1 L0
Enable
E2 E1 E0
n
Load
R0 n Bus
R0
n
LOAD
n n
Select En
R n
n 2
n
n n
En 3ñtoñ1 Bus R1 R1
MUX
Load En
n n
n
R n
n
R2
R2
n
En
En
(a) Register with bidirectional (b) Multiplexer bus (c) Three-state bus using registers
input-output lines and symbol with bidirectional lines
0 1 2
0
Data bus 1
source Enable
decoder 2
Enable 3
A0 A1 A2 D2 D1 D0
k n
Address bus Data bus
Read Write
Memory
2k x n
Load R0
2 2
n n
Load R1
0
n 1
MUX
2
n
3
0
1
Load MUX
R2 2
3
n n
Load R3
n n
0 1 2 3 n
Decoder Register file
D address A data B data
2 n n
Constant in
Destination select n 1 0
MB select S MUX B
Bus A n
Address Out
Bus B n
Data Out
A B n
G select H select
4 A B 2 B
S2:0 || C in S
V Arithmetic/logic 0 IR Shifter IL 0
unit (ALU)
C
G H
N n
n
Z Zero Detect
0 1
MF select
MUX F Function unit
F
Data In
n n
0 1
MD select
MUX D
n Bus D
A0
Data A1
input A •
•
• G0
An – 1
G1 Data
• output G
B0 n-bit •
B1 arithmetic/ Gn – 1
•
Data
input B • logic
• unit
• (ALU)
Bn – 1
Cin
n
A X
n-bit
n parallel n G = X + Y + Cin
B
adder
B input n
Y
S0 logic
S1
Cout
TABLE 7-7
Function Table for Arithmetic Circuit
Select Input G = A +Y + C in
S1 S0 Y Cin = 0 C in = 1
Inputs Output
S1 S0 Bi Yi
0 0 0 0 Yi = 0 S0
0 0 1 0
00 01 11 10
0 1 0 0 Yi = Bi
0 1 1 1 0 1
1 0 0 1 Yi = Bi
1 0 1 0 S1 1 1 1 1
1 1 0 1 Yi = 1
1 1 1 1 Bi
(b) Map Simplification:
(a) Truth table Yi = Bi S0 + Bi S1
Cin
S1
C0
S0
A0 X0
B0 • FA G0
•
Y0
•
•
C1
A1 X1
B1 • FA G1
•
Y1
•
•
C2
A2 X2
B2 • FA G2
•
Y2
•
•
C3
A3 X3
B3 •
FA G3
Y3
• C4
Cout
S0 S0 4 – to– 1
MUX
S1 S1
S1 S0 Output Operation
Ai •
0 G=A B AND
Bi • 0 0 ^
Gi ^
• 0 1 G=A B OR
1
• 1 0 G=A B XOR
• 2 1 1 G=A NOT
Ci Ci + 1
Ai • One stage of
Bi • arithmetic
circuit
2 – to– 1
0 MUX
Gi
1
S
One stage of
logic circuit
S0 •
S1 •
S2
TABLE 7-8
Function Table for ALU
Operation Select
0 0 0 0 G=A Transfer A
0 0 0 1 G = A +1 Increment A
0 0 1 0 G = A +B Addition
0 0 1 1 G = A +B +1 Add with carry input of 1
0 1 0 0 G = A +B A plus 1’s complement of B
0 1 0 1 G = A +B +1 Subtraction
0 1 1 0 G = A –1 Decrement A
0 1 1 1 G=A Transfer A
1 0 0 X G = A∧B AND
1 0 1 X G = A∨B OR
1 1 0 X G = A⊕B XOR
1 1 1 X G=A NOT (1’s complement)
B3 B2 B1 B0
Serial •
output L
•
•
Serial
• output R
IR IL
0 1 2 M 0 1 2 M 0 1 2 M 0 1 2 M
S U S U S U S U
X X X X
2
S • • •
H3 H2 H1 H0
D3 D2 D1 D0
• • •
• •
• •
• • •
S0 • • •
S1 • • •
3 2 1 0 S 1 S0 3 2 1 0 S1 S0 3 2 1 0 S1 S0 3 2 1 0 S1 S0
M M M M
U U U U
X X X X
Y3 Y2 Y1 Y0
TABLE 7-9
Function Table for 4-Bit Barrel Shifter
Select Output
S1 S0 Y3 Y2 Y1 Y0 Operation
0 0 D3 D2 D1 D0 No rotation
0 1 D2 D1 D0 D3 Rotate one position
1 0 D1 D0 D3 D2 Rotate two positions
1 1 D0 D3 D2 D1 Rotate three positions
D data
Write
m
D address
2m x n
Register file
m m
A address B address
A data B data
Constant in n
n
n
1 0
MB select MUX B
Bus A n
Address out
Bus B n
Data out
5 A B
FS
V
C Function
unit
N
Z
F
n n
Data in
0 1
MD select
MUX D
Fig. 7-18 Block Diagram of Datapath Using the Register File and Function Unit
TABLE 7-10
G Select, H Select, and MF Select Codes Defined
in Terms of FS Codes
MF G H
FS Select Select Select Microoperation
Table 7-10 G Select, H Select, and MF Select Codes Defined in Terms of FS Codes
16
DA 15 D address
14 8xn
Register file
13 10
AA 12 A address B address 9 BA
11 8
A data B data
n n
n
Constant in
1 0
MB 7 MUX B
Bus A n
Address out
Bus B n
Data out
A B
6
V 5
C Function 4 FS
N unit
3
Z 2
n n Data in
0 1
MD 1 MUX D
Bus D
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DA AA BA M FS M R
B D W
TABLE 7-11
Encoding of Control Word for the Datapath
DA, AA, BA MB FS MD RW
Function Code Function Code Function Code Function Code Function Code
TABLE 7-12
Examples of Microoperations for the Datapath, Using Symbolic Notation
Micro-
operation DA AA BA MB FS MD RW
Table 7-12 Examples of Microoperations for the Datapath, Using Symbolic Notation
TABLE 7-13
Examples of Microoperations from Table 7-11, Using Binary Control Words
Micro-
operation DA AA BA MB FS MD RW
Table 7-13 Examples of Microoperations from Table 7-11, Using Binary Control Words
DA 1 4 7 1 0 4 5 ×
AA 2 6 7 0 ×
BA 3 0 3 0 ×
MB ×
RW ×
Constant in
× 2 ×
FS 05 24 01 02 00 0C ×
Data in × 18 ×
MD ×
R0 00
R1 01 FF 02
R2 02
R3 03
R4 04 0C 18
R5 05 00
R6 06
R7 07 08
Status bits 4 0 8 ×
Address out 02 00 07 00 ×
Data out 03 06 00 03 00 ×
Clock
3 ns 3 ns
3
Clock WB
Register file OF Register file
3 ns 3 ns
1
MUX B 1 ns MUX B 1 ns
OF
EX 1 ns
EX
MUX D 1 ns
WB 1 ns
3 MUX D 1 ns
MUX B MB
OF
EX Address out
Data out
A B
2 FS
Execute (EX) Function
V
unit
C
N
Z F
Data in
EX
WB
3 MD 0 1
MUX D
Write-back (WB)
WB RW D data
DA Register
file (same
as above)
Clock cycle
1 2 3 4 5 6 7 8 9
R1 → R2 – R3 1 OF EX WB
R4 → sl R6 2 OF EX WB
R7 → R7 + 1 3 OF EX WB
R1 → R0 + 2 4 OF EX WB
Data out → R3 5 OF EX WB
R4 → Data in 6 OF EX WB
R5 → 0 7 OF EX WB
Microoperation
Fig. 7-24 Pipeline Execution Pattern for Microoperation Sequence in Table 7-13