Information Technology Reference
In-Depth Information
Horizontal Versus Vertical Microinstructions
Microinstructions can be
classified as horizontal or vertical. Individual bits in horizontal microinstructions
correspond to individual control lines. Horizontal microinstructions are long and
allow maximum parallelism since each bit controls a single control line. In
vertical microinstructions, control lines are coded into specific fields within a
microinstruction. Decoders are needed to map a field of k bits to 2 k possible com-
binations of control lines. For example, a 3-bit field in a microinstruction could be
used to specify any one of eight possible lines. Because of the encoding, vertical
microinstructions are much shorter than horizontal ones. Control lines encoded
in the same field cannot be activated simultaneously. Therefore, vertical micro-
instructions allow only limited parallelism. It should be noted that no decoding
is needed in horizontal microinstructions while decoding is necessary in the
vertical case.
Example 3
Consider the three-bus datapath shown in Figure 5.5. In addition to
the PC, IR, MAR, and MDR, assume that there are 16 general-purpose registers
numbered R 0 -R 15 . Also, assume that the ALU supports eight functions (add, sub-
tract, multiply, divide, AND, OR, shift left, and shift right). Consider the add oper-
ation Add R 1 , R 2 , R 0 , which adds the contents of source registers R 1 , R 2 , and store
the results in destination register R 0 . In this example, we will study the format of the
microinstruction under horizontal organization.
We will use horizontal microinstructions, in which there is a control bit for
each control line. The format of the microinstruction should have control bits for
the following:
. ALU operations
. Registers that output to out-bus1 (source 1)
. Registers that output to out-bus2 (source 2)
. Registers that input from in-bus (destination)
. Other operations that are not shown here
The following table shows the number of bits needed for ALU, Source 1,
Source 2, and destination:
Purpose
Number of bits
Explanations
ALU
8 bits
8 functions
Source 1
20 bits
16 general-purpose registers þ 4 special-
purpose registers
Source 2
16 bits
16 general-purpose registers
Destination
20 bits
16 general-purpose registers þ 4 special-
purpose registers
Figure 5.13 is the microinstruction for Add R 1 , R 2 , R 0 on the three-bus datapath.
Search WWH ::




Custom Search