UNIT-III Part A
UNIT-III Part A
Address Sequencing
Microinstructions are stored in control memory in groups, with each group specifying a routine.
Each computer instruction has its own microprogram routine in control memory to generate the
microoperations that execute the instruction.
An initial address is loaded into the control address register when power is turned on in the
computer. This address is usually the address of the first microinstruction that activates the
instruction fetch routine.
The control memory next must go through the routine that determines the effective address of the
operand.
The effective address computation routine in control memory can be reached through a branch
microinstruction, which is conditioned on the status of the mode bits of the instruction.
The next step is to generate the microoperations that execute the instruction fetched from
memory.
The transformation from the instruction code bits to an address in control memory where the
routine is located is referred to as a mapping process.
Once the required routine is reached, the microinstructions that execute the instruction may be
sequenced by incrementing the control address register.
When the execution of the instruction is completed, control must return to the fetch routine. This
is accomplished by executing an unconditional branch microinstruction to the first address of the
fetch routine.
The address sequencing capabilities required in a control memory are:
1. Incrementing of the control address register.
2. Unconditional branch or conditional branch, depending on status bit conditions.
3. A mapping process from the bits of the instruction to an address for control memory.
4. A facility for subroutine call and return.
The following figure 5 shows a block diagram of a control memory and the associated hardware
needed for selecting the next microinstruction address.
Microinstruction Format
The microinstruction format for the control memory is shown in following figure 8. 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 = 2 7 words.
For example, the microoperation that specifies the transfer AC DR (F1 = 100) has the symbol
DRTAC, which stands for a transfer from DR to AC.
The CD (condition) field consists of two bits which are encoded to specify four status bit
conditions as listed in Table 4.
The BR (branch) field consists of two bits. It is used, in conjunction with the address field AD, to
choose the address of the next microinstruction.
As shown in Table 5, when BR = 00, the control performs a jump (JMP) operation (which is
similar to a branch), and when BR = 01, it performs a call to subroutine (CALL) operation. The
two operations are identical except that a call microinstruction stores the return address in the
subroutine register SBR.
The jump and call operations depend on the value of the CD field. If the status bit condition
specified in the CD field is equal to 1, the next address in the AD field is transferred to the control
address register CAR. Otherwise, CAR is incremented by 1.
The return from subroutine is accomplished with a BR field equal to 10. This causes the transfer
of the return address from SBR to CAR.
The mapping from the operation code bits of the instruction to an address for CAR is
accomplished when the BR field is equal to 11. This mapping is as depicted in figure 6.
The bits of the operation code are in DR(ll-14) after an instruction is read from memory. Note
that the last two conditions in the BR field are independent of the values in the CD and AD fields.
Microprogram Sequencer
The basic components of a microprogrammed control unit are the control memory and the
circuits that select the next address. The address selection part is called a microprogram
sequencer.
A microprogram sequencer can be constructed with digital functions to suit a particular
application. However, just as there are large ROM units available in integrated circuit packages,
so are general-purpose sequencers suited for the construction of microprogram control units.
The purpose of a microprogram sequencer is to present an address to the control memory so that a
microinstruction may be read and executed.
The next-address logic of the sequencer determines the specific address source to be loaded into
the control address register. The choice of the address source is guided by the next-address
information bits that the sequencer receives from the present microinstruction.
The block diagram of the microprogram sequencer is shown in figure 10. The control memory is
included in the diagram to show the interaction between the sequencer and the memory attached
to it.
Figure : Microprogram sequencer for a control memory.
There are two multiplexers in the circuit. The first multiplexer selects an address from one of four
sources and routes it into a control address register CAR. The second multiplexer tests the value
of a selected status bit and the result of the test is applied to an input logic circuit.
The output from CAR provides the address for the control memory. The content of CAR is
incremented and applied to one of the multiplexer inputs and to the subroutine register SBR.
The other three inputs to multiplexer number 1 come from the address field of the present
microinstruction, from the output of SBR, and from an external source that maps the instruction.
The CD (condition) field of the microinstruction selects 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 figure 10 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 multiplexer. For
example, with S1 S0 = 10, multiplexer input number 2 is selected and establishes a transfer path
from SBR to CAR.
The truth table for the input logic circuit is shown in Table 6. Inputs I1 and I0 are Identical to the
bit values in the BR field.
The function listed in each entry was defined in Table 3. The bit values for S 1 and S0 are
determined from the stated function and the path in the multiplexer that establishes the required
transfer.
The subroutine register is loaded with the incremented value of CAR during a call
microinstruction (BR = 01) provided that the status bit condition is satisfied (T = 1).
The truth table can be used to obtain the simplified Boolean functions for the input logic circuit:
S1 = I1
'
S0 = I1I0 + I 1 T
'
L = I 1I0T
Table : Input logic Truth Table for MicroProgram Sequence