There are four microinstruction registers because there are four instructions that have control of the data path at any instant.
The instruction fetch unit works as it did in Mic-2.
The Decode Unit contains a table that is indexed by the byte code of an ISA instruction. An entry in the table has the location in the Micorinstruction ROM of the starting address for this ISA instruction, and it has the length of the ISA instruction.
Mic-2 |
Mic-4 |
||
dup1 | MAR = SP = SP + 1 | dup1 | MAR = SP = SP + 1 |
dup2 | MDR = TOS; wr; got (MBR1) | dup2 | MDR = TOS; wr; final |
Notice that the instruction is nearly the same in Mic-2 and in Mic-4, except that dup2 had the final bit set in Mic-4.
Z = MDR + H
Mic-2 |
Mic-4 |
||
iflt1 | MAR = SP = SP - 1; rd | iflt1 | MAR = SP = SP - 1; rd |
iflt2 | OPC = TOS | iflt2 | OPC = TOS |
iflt3 | TOS = MDR | iflt3 | TOS = MDR |
iflt4 | N = OPC; if (N) goto T; else goto F | iflt4 | N = OPC |
iflt5 | if (N) goto T | ||
F | H = MBR2 | iflt6 | H = MBR2 |
F2 | goto(MBR1) | iflt7 | final |
Notice the instruction iflt5 in Mic-4. Because there is a goto in iflt5, it would have the goto bit set in the ROM. This is a signal to the Queuing Unit to stop loading microinstructions into the queue. When iflt4 finally reaches MIR4, then the Queuing Unit will load iflt6 or T into the queue, depending on the condition codes.
Mic-2 |
|||
wide_iload1 | MAR = LV + MBRU2; rd; goto iload2 | iload1 | MAR = LV + MBR1U; rd |
iload2 | MAR = SP = SP + 1 | ||
iload3 | TOS = MDR; wr; goto (MBR1) | ||
Mic-4 |
|||
wide_iload1 | MAR = LV + MBRU2; rd | iload1 | MAR = LV + MBR1U; rd |
wide_iload2 | MAR = SP = SP + 1 | iload2 | MAR = SP = SP + 1 |
wide_iload3 | TOS = MDR; wr; final | iload3 | TOS = MDR; wr; final |