Sub topic 14
Hardwired Control Units
Assume you know binary and hexadecimal numbers, basic logic gates, registers, memory, and register-transfer notation. This chapter explains how a processor creates control signals using fixed digital logic.
What a hardwired control unit does
A control unit coordinates the datapath. The datapath contains registers, buses, memory interfaces, and the arithmetic logic unit (ALU). The control unit tells these components which actions to perform and when to perform them.
A hardwired control unit generates signals with decoders, logic gates, multiplexers, counters, and flip-flops. Its behavior is determined by the circuit structure. It does not read control steps from a writable control memory.
The control unit usually uses these inputs:
- The opcode from the instruction register.
- Timing signals that identify the current step.
- Status flags such as zero, carry, and overflow.
- External signals such as memory-ready or interrupt requests.
It produces signals such as PCout, MARin, Read, MDRin, IRin, ALUadd, and R1in.
Control as a finite-state machine
A hardwired controller can be modeled as a finite-state machine. A finite-state machine is a circuit that moves between a fixed number of states according to its current state and input conditions.
For every instruction, the controller commonly performs:
- Fetch the instruction.
- Decode its opcode.
- Execute the required register transfers.
- Return to the fetch state.
For example, an ADD R1, R2 instruction might require these transfers:
| Time | Register transfer | Important control signals |
|---|---|---|
| T0 | `MAR <- PC` | `PCout`, `MARin` |
| T1 | `MDR <- M[MAR]`, `PC <- PC + 1` | `Read`, `MDRin`, `PCinc` |
| T2 | `IR <- MDR` | `MDRout`, `IRin` |
| T3 | `R1 <- R1 + R2` | `R1out`, `R2out`, `ALUadd`, `R1in` |
An opcode decoder activates the logic associated with ADD. A timing counter activates the correct signals for T0, T1, T2, and T3. Logic gates combine the opcode and timing conditions.
Advantages and failure modes
Hardwired control is usually fast because signals pass through dedicated logic instead of requiring a control-store memory lookup. It also works well for small, regular instruction sets.
Its main weakness is difficult modification. Adding an instruction may require redesigning decoders and logic equations. A logic error can activate conflicting signals, such as enabling two registers to drive one bus simultaneously.
Compared with microprogrammed control, hardwired control is faster but less flexible. Designers choose it when performance and a relatively stable instruction set matter more than ease of modification.
Exercise
Why does a hardwired control unit need both an opcode decoder and a timing generator?
Show answer
The opcode decoder identifies which instruction is being executed, while the timing generator identifies the current step. Their combination selects the correct control signals for that instruction and step.