Skip to main content

Microinstruction format and fetch microprogram

Short answer

The format uses three 3-bit fields (F1, F2, F3) for microoperations, a 2-bit CD condition, a 2-bit BR branch type, and a 7-bit AD. The fetch routine at address 64 does: PCTAR; then READ,INCPC; then DRTAR with MAP to branch to the execute routine of the fetched instruction.

Explain the microinstruction format used in a microprogrammed control unit and write the micro program for the fetch cycle.

A microprogrammed control unit stores in its control memory a microprogram for each instruction. Each microinstruction has fields which select microoperations and the address of the next microinstruction.

Microinstruction format (Mano, 20 bits)

  | F1 | F2 | F3 | CD | BR | AD |
  | 3  | 3  | 3  | 2  | 2  | 7  |   = 20 bits
FieldBitsMeaning
F1, F2, F33 eachThree microoperation fields. Each selects one of 7 microoperations (000 = none), so up to 3 can be done at the same time.
CD2Condition: 00 = U (always 1), 01 = I (indirect bit DR(15)), 10 = S (sign of AC), 11 = Z (AC is zero)
BR2Branch type: 00 JMP, 01 CALL, 10 RET, 11 MAP
AD7Address of the next microinstruction when branching (control memory of 128 words)

Microoperation codes:

F1OperationF2OperationF3Operation
001AC ← AC + DR001AC ← AC - DR001AC ← AC xor DR
010AC ← 0010AC ← AC or DR010AC ← AC'
011AC ← AC + 1011AC ← AC and DR011shl AC
100AC ← DR100DR ← M[AR]100shr AC
101AR ← DR(0-10)101DR ← AC101PC ← PC + 1
110AR ← PC110DR ← DR + 1110PC ← AR
111M[AR] ← DR111DR(0-10) ← PC111not used

The fields can be written symbolically, for example READ, INCPC U JMP NEXT, which uses F2 and F3 with an unconditional jump to the next address.

Fetch cycle microprogram

The fetch cycle needs these register transfers: AR ← PC; DR ← M[AR], PC ← PC + 1; AR ← DR(0–10), then branch to the routine of the opcode (MAP). The fetch routine starts at address 64 of the control memory.

Address (dec / bin)LabelMicrooperationsCDBRADBinary F1 F2 F3 CD BR AD
64 / 1000000FETCHPCTARUJMPNEXT110 000 000 00 00 1000001
65 / 1000001-READ,INCPCUJMPNEXT000 100 101 00 00 1000010
66 / 1000010-DRTARUMAP0101 000 000 00 11 0000000

Symbolic form:

ORG 64
FETCH:  PCTAR            U JMP NEXT    ; AR <- PC
        READ, INCPC      U JMP NEXT    ; DR <- M[AR], PC <- PC + 1
        DRTAR            U MAP         ; AR <- DR(0-10), go to routine

The MAP microinstruction takes the opcode from DR and maps it to the start address of the execute routine (0 xxxx 00, so ADD = 0, BRANCH = 4, STORE = 8, EXCHANGE = 12).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 3 questions →