In microprogrammed control, the control signals aren't computed by gates. They're stored. Each step of each instruction gets a microinstruction: a word holding one bit per control signal, plus information about which microinstruction comes next. The words live in a small ROM called the control store.
A register called the micro-PC points at the current microinstruction, just as the program counter points at the current instruction. Each clock cycle:
- the microinstruction at the micro-PC drives the control signals;
- the micro-PC moves on, to the next word or to a jump target. After decode, it jumps to the microprogram for the current opcode.
So a machine instruction like ADD is run by a short microprogram: a few microinstructions, one per step.
Trade-offs compared with hardwired control:
- Easier to change: a new instruction is new words in the control store, plus an entry pointing its opcode there. The datapath may still need new wires.
- Usually slower per step, because each step needs a ROM read.
- Good for large, complex instruction sets. Today's x86 chips, for instance, run their most complicated instructions from microcode, and a firmware patch can change that microcode after the chip has shipped.