2020 21 5a

Computer Organization and Architecture2020-2110 marksHardwire and micro programmed control

What is a micro program sequencer? With block diagram, explain the working of micro program sequencer.

What is a micro program sequencer? With block diagram, explain the working of micro program sequencer.

Quick answer

A microprogram sequencer is the circuit that decides the address of the next microinstruction to be read from the control memory. A microprogram control unit needs it because the microinstructions are not always run in a straight line. They may branch, call a micro-subroutine, or jump to the routine of a new machine instruction.

Block diagram parts

  • Multiplexer (MUX): picks one of the possible sources for the next address.
  • Branch logic (condition select): tests a status bit, for example zero or carry, chosen by the microinstruction. It decides if the branch is taken.
  • Incrementer: adds one to the present address, for straight-line flow.
  • Subroutine register (SBR): stores the return address for a micro-subroutine call.
  • Control address register (CAR): holds the address that goes to the control memory.
  • Control memory: holds the microinstructions. Its output goes to the pipeline register.
  • Mapping logic: converts the opcode of the machine instruction into the starting address of its microroutine.

Working

The control memory reads the microinstruction at the address in CAR. This microinstruction has a micro-operation field, a condition select field, a branch control field and a branch address field. The micro-operation field goes out as control signals. The other fields go into the sequencer.

The sequencer then chooses the next address from one of these sources.

  1. Next in sequence: if no branch is needed, the incrementer gives CAR plus one.
  2. Branch address: if the tested condition is true, the address field of the microinstruction is loaded into CAR. If it is false, CAR is incremented.
  3. Mapped address: at the end of the fetch routine, the mapping logic turns the opcode into the starting address of the right routine.
  4. Subroutine call and return: for a call, the return address (CAR plus one) is saved in SBR and the branch address is loaded. For a return, SBR is loaded back into CAR.

The multiplexer selects among these by the select lines that come from the branch control field. Then CAR is loaded with the chosen address at the next clock pulse, and the cycle repeats.

Example. If the control memory has 128 words, CAR is 7 bits wide, since $2^7 = 128$. The branch address field is also 7 bits. A common micro-subroutine, for example the one that finds an indirect operand address, is written once and called by many routines, which saves control memory.

The sequencer keeps the control unit flexible, since the order of microinstructions can be changed without any change in the hardware.

Summary of the sequencer. In one line, the sequencer is the "next address" box of the control unit. It lets the microprogram do loops, tests and calls, in the same way that a branch instruction does it in a machine program.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.

Up nextDifferentiate between hardwired and micro programmed control unit. Explain each component