2019 20 5b

Computer Organization and Architecture2019-2010 marksHardwire and micro programmed control

Explain the organization of Microprogrammed control unit in detail.

Explain the organization of Microprogrammed control unit in detail.

Quick answer

In a microprogrammed control unit the control signals are not made by logic gates. They are stored as words, called microinstructions, in a special memory. A set of microinstructions that carries out one machine instruction is a microprogram or routine.

Main components

  • Control memory: a fast ROM that holds all the microprograms. One word is one microinstruction.
  • Control address register (CAR): holds the address of the next microinstruction to read.
  • Control data register (CDR) or pipeline register: holds the microinstruction just read, so the next address can be prepared while this one is used.
  • Next address generator (sequencer): works out the next value for CAR. It can increment CAR, load a branch address, load an address from the opcode, or return from a subroutine.
  • Decoders and control outputs: the fields of the microinstruction go out as control signals to the ALU, registers and memory.

Format of a microinstruction. It usually has three parts. The first is the micro-operation field, which gives the control signals. The second is the condition field, which selects a status bit to test. The third is the branch address field, which gives the next address when the condition is true.

Working

First, the opcode of the machine instruction in IR is mapped to the starting address of its microprogram. This address is loaded in CAR. Then the microinstruction at that address is read from the control memory into CDR. Its micro-operation field is sent out as control signals, so the hardware does that step. At the same time the sequencer finds the next address. If there is no branch, CAR is increased by one. If the condition is true, the branch address is loaded. This repeats until the last microinstruction, which sends the control back to the fetch routine for the next instruction.

Control memory sizes. For example, if the control memory has 128 words, CAR needs 7 bits, because $2^7 = 128$.

Advantages. The design is regular and easy to change. New instructions can be added by writing new microprograms, so it is flexible.

Disadvantage. It is slower than a hardwired unit, because each step needs a memory read.

Address sequencing. The sequencer has to choose the next address in four common ways. It can increment CAR for straight-line code. It can branch to an address given in the microinstruction, conditionally or not. It can map the opcode bits to a starting address, which happens at the end of the fetch routine. And it can call and return from a micro-subroutine, using a small register to save the return address. A multiplexer in the sequencer picks one of these sources.

Mapping example. If the opcode is 4 bits and each routine can have up to 4 microinstructions, the starting address can be formed as 0, opcode, 00. So opcode 0011 maps to address 0001100, which is 12. This keeps the mapping hardware very simple.

Horizontal and vertical forms. The micro-operation field may be coded one bit per signal (horizontal) or in encoded groups (vertical). This choice trades speed for control memory size.

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

Up nextDiscuss the different mapping techniques used in cache memories and their relative merits