Skip to content
BetterDL

Microprogrammed control

Also called: microprogramming, microcode, microprogrammed control unit

A control unit that stores each step's control signals as a microinstruction in a small ROM, stepping through them with a micro-PC.

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:

  1. the microinstruction at the micro-PC drives the control signals;
  2. 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.

Worked example

Example

How wide is a microinstruction?

A control unit drives 14 control signals. Each microinstruction holds one bit per signal plus a next-address field that can point anywhere in a 64-word control store.

  1. 1.

    Control bits: 14.

  2. 2.

    Next address: 2⁶ = 64, so 6 bits.

  3. 3.

    Width: 14 + 6 = 20 bits.

  4. 4.

    The whole control store holds 64 × 20 = 1280 bits.

Common mistakes

  • Confusing the micro-PC with the program counter. One steps through microinstructions, the other through machine instructions.

  • Thinking microprogramming removes the need for datapath changes. A new transfer still needs a wire.

  • Assuming microprogrammed control is faster. It's usually more flexible but slower per step.

Practice Microprogrammed control

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Microprogrammed control is taught in Basic CPU / Computer Architecture.