Sub topic 17
Choosing Between Hardwired and Microprogrammed Control
Assume you know binary arithmetic, registers, memory, multiplexers, and the basic fetch-decode-execute cycle. This chapter focuses on how a control unit produces the signals that move data through a datapath.
Two ways to generate control signals
The control unit interprets the instruction register and the current timing step. It then activates signals such as:
- Loading a register
- Selecting an ALU operation
- Reading or writing memory
- Incrementing the program counter
- Selecting the next control step
A hardwired control unit generates these signals with fixed logic circuits. Its inputs include opcode bits, timing signals, and condition flags. Decoders, gates, and flip-flops implement the control logic.
A microprogrammed control unit stores control words in a control memory, also called a control store. Each microinstruction contains the control signals for one small datapath operation and information about the next microinstruction. Executing a machine instruction therefore runs a short sequence of microinstructions.
Trade-offs
Hardwired control is usually faster because signals pass through logic circuits instead of requiring control-memory access. It works well when the instruction set is small and regular. However, changing the instruction set or fixing a control-logic error may require redesigning hardware.
Microprogrammed control is easier to design and modify. Complex instructions can be expressed as readable sequences of microinstructions. This approach suits large or irregular instruction sets. Its cost is extra time for microinstruction sequencing and control-store access.
| Property | Hardwired control | Microprogrammed control |
|---|---|---|
| Control generation | Fixed logic circuits | Stored microinstructions |
| Speed | Usually faster | Usually slower |
| Modification | Difficult | Relatively easy |
| Complex instruction support | More difficult | Easier |
| Hardware structure | Logic-heavy | Memory and sequencer-heavy |
The choice depends on the processor’s goals. A performance-focused design with a simple instruction set often favors hardwired control. A design that prioritizes flexibility, compatibility, or complex instructions may favor microprogrammed control.
Control-store sizing
GATE questions often ask for control-memory capacity. If a processor has n distinct microinstructions and each microinstruction has w bits, the control store requires:
n × wbits of storageceil(log2 n)address bits if every microinstruction needs a unique address
For example, 1,024 microinstructions, each forty bits wide, require 1,024 × 40 = 40,960 bits. The microprogram counter needs 10 bits because 2¹⁰ = 1,024.
A horizontal microinstruction has many direct control bits. It is wide but can activate several datapath actions in parallel. A vertical microinstruction uses encoded fields. It is narrower but needs decoding and may allow fewer simultaneous actions.
Exercise
A control store contains 2,048 microinstructions, and each microinstruction is 36 bits wide. What are its capacity and address width?
Show answer
Capacity is 2,048 × 36 = 73,728 bits. The address width is 11 bits because 2¹¹ = 2,048.