Microprogrammed Control Unit
Microprogrammed Control Unit
The control memory is assumed to be a ROM, within which all control information is
permanently stored. The control memory address register specifies the address of the
microinstruction, and the control data register holds the microinstruction read from memory. The
microinstruction contains a control word that specifies one or more microoperations for the data
processor. Once these operations are executed, the control must determine the nest address.
The next address generator is sometimes called a microprogram sequencer, as it determines the
address sequence that is read from control memory. ;the address of the next microinstruction can
be specified in several ways, depending on the sequencer inputs.
The control data register holds the present microinstruction while the next address is computed
and read from memory. It allows the execution of the microoperations specified by the control
word simultaneously with the generation of the next microinstruction.
The main advantage of the micro programmed control is the fact that once the hardware
configuration is established; there should be no need for further hardware or wiring changes. If
we want to establish a different control sequence for the system, all we need to do is specify a
different set of microinstruction for control memory. The hardware configuration should not be
changed for different operations; the only thing that must be changed is the microprogram
residing in control memory.
Figure above shows a block diagram of address sequencer and the associated hardware needed
for selecting the next microinstruction. The diagram shows four different paths from which the
control address register (CAR) receive the address. The incremented increments the content of
the control address register by one, to select the next microinstruction in sequence. Branching is
achieved by specifying the branch address in one of the fields of the microinstruction.
The branch logic provides decision-making capabilities in the control unit. The branch logic
hardware may be implemented in a variety of ways. The simplest way is to test the specified
For each operation code there exists a micro program routine in control memory that executes
the instruction. One simple mapping process that converts the 4-bit operation code to a 7-bit
address for control memory is shown in fig. 4-3. This mapping consists of placing a 0 in the most
significant bit of the address, transferring the four operation code bits, and clearing the two lest
significant bits of the control address register.
Micro instructions can be saved by employing subroutines that use common sections of
microcode. Micro programs that use subroutines must have a provision for storing the return
address during a subroutine call and restoring the address during a subroutine return. This may
be accomplished by placing the incremented output from the control address register into a
subroutine register and branching to the beginning of the subroutine. The subroutine register can
then become the source for transferring the address for the return to the main routine.
The CD (condition) field of the microinstruction selecting one of the status bits in the second
multiplexer. If the bit selected is equal to 1, the T (test) variable is equal to 1; otherwise, it is
equal to 0. The T value together with the two bits from the BR (branch) field go to an input logic
circuit. The input logic in a particular sequencer will determine the type of operations that are
available in the unit.
The input logic circuit in Fig. below has three inputs, I0, I1, and T, and three outputs, S0, S1 and
L. variables S0 and S1 select one of the source addresses for CAR. Variable L enables the load
input in SBR. The binary values of the two selection variables determine the path in the
MICROPROGRAM EXAMPLE
MICROINSTRUCTION FORMAT
The microinstruction format for the control memory is shown in Fig. 4-6. The 20 bits of the
microinstruction are divided into four functional parts. The three fields F1, F2, and F3 specify
microoperations for the computer. The CD field selects status bit conditions. The BR field
specifies the type of branch to be used. The AD field contains a branch address. The address
field is seven bits wide, since the control memory has 128 words. The microoperations are
subdivided into three fields of three bits each. The CD (condition) field consists of two bits
which are encoded to specify four status bit conditions. The BR (branch) field consists of two
bits. It is used, in conjunction with address field AD, to choose the address of the next
microinstruction.