2022 23 5b

Computer Organization and Architecture2022-2310 marksHardwire and micro programmed control

What are the differences between hardwired and micro-programmed control unit?

What are the differences between hardwired and micro-programmed control unit?

Quick answer

The control unit makes the signals that tell the other parts of the CPU what to do in each clock cycle. It can be built in two ways.

PointHardwired control unitMicroprogrammed control unit
MethodFixed logic circuit of gates, decoders and countersMicroinstructions stored in a control memory
SpeedFastSlower, each step needs a memory read
DesignComplex and hard to changeSimple, regular, easy to change
ModificationWiring must be changedOnly the microprogram is changed
CostHigh for large instruction setsLower for large instruction sets
Error fixingHardEasy
Instruction setSmall, simpleLarge, complex
Used inRISC machinesCISC machines
Control memoryNoneROM or writable store
ExamplesMIPS, ARMIBM 360, VAX

Explanation. In the hardwired unit, the opcode is decoded and combined with the timing signals by logic gates. The gates give the control signals straight away, so it is very fast. But a change in even one instruction means a new circuit. Its design needs state tables and Boolean equations, so a big instruction set makes the design long and error-prone.

In the microprogrammed unit, each machine instruction has a small program of microinstructions in the control memory. The control address register selects the microinstruction, and its bits go out as control signals. The next address is found by the sequencer. To add or fix an instruction, one just writes or changes its microprogram. The price is the memory access in each step, which makes it slower.

Which is better. Neither is best everywhere. When speed matters most and the instruction set is small, as in RISC, the hardwired design is chosen. When the instruction set is large and flexibility matters, as in CISC, microprogrammed control is chosen. Some modern CPUs use a mix, with hardwired control for common simple instructions and microcode for rare complex ones.

Short example. Suppose the CPU must run an ADD. In the hardwired unit, the ADD line from the decoder and the timing pulse $T_4$ meet at an AND gate, and its output starts the add. In the microprogrammed unit, the opcode is mapped to the address of the ADD routine, the first microinstruction is read, and its bits start the same add. Both give the same result. The first does it with gates, and the second does it by reading words from memory.

Effect on the instruction set. Because microcode is cheap to change, early computers added many complex instructions, which led to the CISC style. When designers saw that simple instructions are used most, they moved to hardwired control with RISC.

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 Memory Hierarchy in computer system with regard to Speed, Size and Cost.