Skip to main content

Microinstruction format and microprogram design

Short answer

Fetch routine at address 64: PCTAR; READ,INCPC; DRTAR,MAP. ADD routine at 0: if I=1 CALL INDRCT; READ; ADD,JMP FETCH. Indirect routine at 67: READ; DRTAR,RET. Sequencing uses CAR+1, branch AD, opcode mapping, and SBR return.

Design microinstruction format, symbolic and binary micro program that can perform fetch cycle, indirect cycle and add operation. Also design and describe the sequencing technique that is used in control unit.

Microinstruction format

Use Mano's 20-bit format with a 128-word control memory (7-bit address).

 | F1(3) | F2(3) | F3(3) | CD(2) | BR(2) | AD(7) |
  • F1, F2, F3: microoperation fields. F1: 001 ADD (AC←AC+DR), 100 DRTAC, 101 DRTAR (AR←DR(0-10)), 110 PCTAR (AR←PC), 111 WRITE. F2: 100 READ (DR←M[AR]), 101 ACTDR, 111 PCTDR. F3: 101 INCPC (PC←PC+1), 110 ARTPC.
  • CD: 00 U (always true), 01 I (indirect bit DR(15)), 10 S (sign of AC), 11 Z (zero of AC).
  • BR: 00 JMP, 01 CALL, 10 RET, 11 MAP.
  • AD: branch address.

Memory layout

Fetch routine at 64, indirect routine at 67, ADD routine at 0 (opcode 0000 maps to 0 0000 00 = 0).

Symbolic microprogram

        ORG 0
ADD:    NOP              I  CALL  INDRCT   ; if I = 1, do indirect
        READ             U  JMP   NEXT     ; DR <- M[AR]
        ADD              U  JMP   FETCH    ; AC <- AC + DR, go to fetch
        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), map opcode
INDRCT: READ             U  JMP   NEXT     ; DR <- M[AR]
        DRTAR            U  RET            ; AR <- DR(0-10), return

Binary microprogram

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
67 / 1000011INDRCTREADUJMPNEXT000 100 000 00 00 1000100
68 / 1000100-DRTARURET0101 000 000 00 10 0000000
0 / 0000000ADDNOPICALLINDRCT000 000 000 01 01 1000011
1 / 0000001-READUJMPNEXT000 100 000 00 00 0000010
2 / 0000010-ADDUJMPFETCH001 000 000 00 00 1000000

(The AD field of MAP and RET is not used and is 0000000; the fetch routine ends with MAP so the opcode of DR chooses the next routine.)

Sequencing technique

The sequencer selects the next control address (CAR) from four sources:

  • CAR + 1 when BR = JMP and the condition is false (or for sequential microinstructions),
  • AD field when BR = JMP or CALL and the condition (CD) is true,
  • SBR when BR = RET (return address saved by CALL),
  • mapping logic (0 + opcode + 00) when BR = MAP.
 opcode -> map -+
 AD field ------+--> MUX --> CAR --> Control memory
 SBR -----------+     ^
 CAR+1 ---------------+  (select by CD, BR via branch logic)

Execution of ADD: fetch (64–66) loads AR and maps to address 0. At 0, if I = 1 (indirect) CALL INDRCT (67) saves return address 1 in SBR; INDRCT reads the effective address and RET goes back to address 1. At 1, DR ← M[AR]; at 2, AC ← AC + DR and the jump to FETCH starts the next instruction.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 3 questions →