← 🧠 ALU, Datapath & Control Unit
Subtopic 9 of 9

5.9Microinstruction sequencing

The idea

Microinstruction sequencing decides which micro-instruction runs next: usually the next one, but sometimes a branch or a jump back to fetch.

Think of it like this: Reading a recipe: normally the next line, occasionally "if the dough is sticky, go to step 9".

Why it exists

Without it a microprogram could only run in a straight line.

How it works

  1. Default: μPC ← μPC + 1.
  2. A branch field can load μPC with a target if a flag is set.
  3. The last micro-instruction of a routine loads μPC with the fetch routine start.
  4. The first one of a routine comes from mapping the opcode.

Worked example: Branch on Z

Word 201 says "branch to 250 if Z = 1". Z = 1, so μPC becomes 250.

Now play with it

  • →Step through and compare the plain increment with the branch.
μPC200
Control store-
Flag Z1
Next-address logic-
  • μPC = 200: read word 200
  • No branch field: next = μPC + 1
  • Word 201 has "branch if Z = 1 to 250"; Z = 1, so condition holds
  • μPC ← 250 (branch taken)
  • Last word of the routine: μPC ← mapping of the next instruction opcode (back to fetch)

Check yourself

By default, which address does the next micro-instruction come from?

Remember: Default μPC + 1; branches and mapping change it.
Exam notes (the dense version)

Next address from: μPC+1, branch field (conditional), or mapping from opcode. Control-store size = #microinstr × width.

Previous year questions: ALU, Datapath & Control Unit (3)

PYQs are grouped by topic, so this is the full set for ALU, Datapath & Control Unit; try the ones that match this subtopic. Open all 3 on the topic page.