Information Technology Reference
In-Depth Information
Figure 5.13 Microinstruction for Add R 1 , R 2 , R 0
Example 4
In this example, we will use vertical microinstructions, in which
decoders will be needed. We will use a three-bus datapath as shown in Figure 5.5.
Assume that there are 16 general-purpose registers and that the ALU supports eight
functions. The following tables show the encoding for ALU functions, registers
connected to out-bus 1 (Source 1), registers connected to out-bus 2 (Source 2),
and registers connected to in-bus (Destination).
Purpose
Number of bits
Explanations
ALU
4 bits
8 functions þ none
Source 1
5 bits
16 general-purpose registers þ 4 special-purpose
registers þ none
Source 2
5 bits
16 general-purpose registers þ none
Destination
5 bits
16 general-purpose registers þ 4 special-purpose
registers þ none
Encoding
ALU function
0000
None (ALU will connect out-bus1 to in-bus)
0001
Add
0010
Subtract
0011
Multiple
0100
Divide
0101
AND
0110
OR
0111
Shift left
1000
Shift right
Encoding
Source 1
Destination
Encoding
Source 2
00000
R 0
R 0
00000
R 0
00001
R 1
R 1
00001
R 1
00010
R 2
R 2
00010
R 2
00011
R 3
R 3
00011
R 3
00100
R 4
R 4
00100
R 4
00101
R 5
R 5
00101
R 5
00110
R 6
R 6
00110
R 6
00111
R 7
R 7
00111
R 7
01000
R 8
R 8
01000
R 8
01001
R 9
R 9
01001
R 9
01010
R 10
R 10
01010
R 10
Search WWH ::




Custom Search