Computer Organisation and Architecture · UGC NET: Microprogrammed Control
Control Memory and Address Sequencing
Overview
A microprogrammed control unit does not generate control signals from fixed hardware gates; it reads them from a control memory as a sequence of microinstructions. The unit therefore needs a mechanism that decides which microinstruction to fetch next — sequential step, jump, conditional branch, subroutine call/return, or the first microinstruction of a new machine instruction.
That mechanism is address sequencing. This lesson sits inside the official UGC topic Microprogrammed Control and is examined through bit-width calculations of the microinstruction format, mapping of opcodes to control addresses, and the roles of the control address register, incrementer, branch field, condition field and subroutine register.
You should already know what a register transfer microoperation is, what an opcode is, and how a ROM is addressed, before starting here.
The standard convention used throughout is M. Morris Mano's Computer System Architecture model, in which control memory is a ROM of words, each word being one microinstruction.
Key concepts
- Microoperation: an elementary operation performed on data stored in registers (e.g., , , shift, complement). It is the smallest indivisible action.
- Microinstruction: one control word stored in control memory; it specifies one or more microoperations together with next-address information.
- Microprogram: the ordered set of microinstructions that implements one machine instruction. A microprogram routine is the same thing viewed as a subroutine of the control unit.
- Control memory (control store): the memory inside the control unit that stores microinstructions.
In the standard model it is a ROM; if it is writable it is called a WCS (Writable Control Store) and permits dynamic microprogramming. - Control word width: the number of bits in one microinstruction; it equals the sum of the widths of all its fields.
- Control Address Register (CAR): holds the address of the microinstruction to be fetched from control memory. Its width is fixed by the number of words in control memory.
- Sequencer / Next Address Generator: the combinational block that computes the next value of CAR.
- Address sequencing: the process of selecting the next microinstruction address.
The four standard sources are: the incrementer, the branch address field (AD) of the current microinstruction, the mapping logic driven by the machine-instruction opcode, and the subroutine return register / stack (SBR). - Branch field (BR): selects the type of next-address operation (continue, jump, call, return, map).
- Condition field (CD): selects which status bit (zero, carry, sign, overflow, indirect bit, etc.) is tested; one code normally means "unconditional".
- Address field (AD): supplies the target address used by a jump or call.
- Mapping: the process by which the opcode of a machine instruction is transformed into the starting address of its microprogram in control memory.
- Subroutine nesting: because microsubroutines may be nested, return addresses are kept in a LIFO stack; a single return register holds only one level.
- Diagnosability: since each microinstruction is a small, well-defined operation, faults are easier to detect.
Diagnostic tools examine the contents of flags, registers and counters, which together hold the internal state of the control unit.
How it works
1. Structure of the unit. The opcode part of the instruction register feeds the mapping logic. The sequencer chooses one of its inputs, loads CAR, control memory outputs the addressed microinstruction, and the AD/BR/CD fields of that microinstruction return to the sequencer to decide the following address.
2. The four address sources and when each is used.
- Incrementer: routine case. Next address CAR ; used when the condition is false or the microinstruction is the last in a straight-line block.
- Branch address field (AD): taken jump or a conditional branch whose condition is true.
- Mapping logic: only at the start of every machine instruction, to produce the first address of that instruction's microprogram from its opcode.
- Subroutine register / stack: used on a return from a microsubroutine.
3. Branch field options. A 2-bit BR field gives exactly four choices in the Mano model:
| BR value | Operation | Next address in CAR |
|---|---|---|
| 0 | Continue / jump on condition false | CAR |
| 1 | Jump or conditional branch (if CD condition true) | AD |
| 2 | Call microsubroutine | SBR CAR , then CAR AD |
| 3 | Return from microsubroutine / map | CAR SBR, or CAR mapped opcode address |
4.
Mapping procedure. Take the -bit opcode field from the instruction register, insert zeros to its left and zeros to its right to fill the -bit CAR. The zeros on the right reserve a block of consecutive words for the microprogram of one opcode, so a branch inside the routine can stay inside the block.
5. Condition field. With 4 status bits to choose from, 2 bits suffice (); if one code is reserved for "always", only 3 real conditions plus unconditional are available.
6. Subroutine handling. Each call saves CAR into SBR (or pushes it on a stack); the return pops it back. Nested calls at depth need saved addresses, hence a stack.
7. Execution order of a machine instruction. Fetch the machine instruction → map its opcode to a control address → execute the microinstructions sequentially with branches as decided → when the routine ends, fetch the next machine instruction and map again.
Drawing the diagram…
Formulas
- Field width for distinct choices: bits, where . Example: gives , because .
- Control address register width: , where is the number of words in control memory.
- Total capacity of control memory: bits, with the microinstruction width.
- Microinstruction width: (sum over every field present).
- Mapping address size: bits, where = opcode bits, = zeros inserted on the left, = zeros inserted on the right.
- Number of blocks addressable after mapping: opcodes, each with words in its reserved block.
- Branch reach with a -bit AD field: words per page when AD is shorter than .
Worked examples
Example 1 (direct bit calculation). A microinstruction has microoperation subfields F1 and F2, each with 15 distinct microoperations; a CD field selecting among 4 status bits; a BR field with 4 options; and an AD field for a 128-word control memory. Find the microinstruction size.
- F1: bits.
- F2: same, 4 bits.
- CD: bits.
- BR: bits.
- AD: bits.
- Total bits.
Example 2 (weighted-position, two steps). An address is specified as . How many 1s are in its binary form?
- Recognise , , , , so the value is .
- Each octal digit becomes 3 binary bits: , , , .
- Binary: ; ones .
Example 3 (mapping). An 8-bit opcode is mapped by placing two zeros on the left and two zeros on the right. Find the control memory address space and the starting address for opcode .
- Address width bits, so the control memory has words.
- Opcode gives , i.e. address in decimal.
- Each opcode owns consecutive words.
Example 4 (format fitting). Control memory has 512 words of 32 bits; the format has a 16-bit microoperation field, a 2-bit CD field and an AD field that must reach every word. Find the widths.
- AD needs bits.
- Used bits; the word is 32 bits, so 5 bits are unused.
- Capacity bits.
Example 5 (two-step, hard). A control memory has 2048 words; the format is 12-bit microoperation, 3-bit condition, and a branch address field. If the AD field is only 8 bits, what is the microinstruction width and how far can one branch reach?
- Full address width bits.
- With an 8-bit AD field, total width bits.
- A branch can reach words directly; the high 3 address bits must come from elsewhere (a page register), so control memory is effectively split into pages of 256 words.
Example 6 (statement type).
Statement I: With a single subroutine return register, microsubroutines can be nested to any depth.
Statement II: On a microsubroutine call, the value saved is the incremented CAR.
- I is false: one register stores one address, so a second call overwrites the first return address; nesting needs a stack.
- II is true: the return point is the microinstruction after the call, i.e. CAR .
Answer: I false, II true.
Comparison
| Feature | Control memory | Main memory / cache |
|---|---|---|
| Location | Inside the control unit | Outside the CPU (main) or on-chip (cache) |
| Contents | Microinstructions (control words) | Machine instructions and data |
| Normal operation | Read-only (ROM); WCS if writable | Read and write |
| Addressed by | CAR | PC / MAR |
| Visible to programmer | No (except WCS microprogramming) | Yes |
| Feature | CAR | PC |
|---|---|---|
| Holds | Address of next microinstruction | Address of next machine instruction |
| Updated by | Sequencer (increment, AD, mapping, SBR) | Incrementer, branch logic |
| Width fixed by | Size of control memory | Size of main memory |
| Source of next address | Trigger |
|---|---|
| Incrementer | Sequential step, or condition false |
| AD field | Unconditional jump, or conditional branch taken |
| Mapping logic | Start of each machine instruction |
| Subroutine register / stack | Return from microsubroutine |
| Look-alike pair | Difference |
|---|---|
| Mapping vs branch | Mapping derives the first address from the opcode; branching takes an address from the AD field |
| Microoperation vs microinstruction | Microoperation is one elementary action; microinstruction is the control word holding one or more of them |
| Microprogram vs microinstruction | Microprogram is the whole routine for one machine instruction |
Revision summary
- Control memory stores microinstructions, not machine instructions.
- The set of microinstructions implementing one machine instruction is a microprogram.
- CAR width ; 512 words 9 bits, 1024 10, 2048 11.
- choices need bits; 15 microoperations need 4 bits, not 3.
- Capacity bits; 512 words of 24 bits bits.
- Address sequencing has four sources: incrementer, AD field, mapping logic, subroutine register.
- Nested microsubroutines need a stack; one register is not enough.
- Mapping inserts zeros on both sides of the opcode; total width .
- CD selects which condition; BR selects what type of branch.
- Flags, registers and counters are the observables used in fault diagnosis.
- The incrementer supplies CAR only when no branch is taken.
Previous-year exam insights
- Bit-count of the microinstruction format is the most frequent numeric question: convert "distinct microoperations / conditions / branch options / address space" into bits and add them.
The trap is using without rounding up when is not a power of two. - Mapping arithmetic appears as "zeros on the left and right of the opcode": check whether the question asks for the address width, the number of words, or the actual address value.
- Octal/binary weight questions disguised as arithmetic: recognise powers of 8, convert each octal digit to three bits, then count ones.
- Statement I/II questions test whether the incrementer always gives the next address (it does not), and whether one return register supports nesting (it does not).
- Match List-I with List-II questions pair microoperation, microinstruction, microprogram, control memory, incrementer, mapping logic, subroutine register and condition field with their descriptions — learn one-line definitions.
- Assertion–Reason questions on placing mapping logic between the instruction register and CAR, and on reloading CAR through mapping at the start of every machine instruction.
- Ordering questions on the sequence: fetch machine instruction, map opcode, execute microinstructions, test condition, branch or increment, return.
- Watch for options that confuse control memory with cache or RAM, and CAR with PC; both are standard distractors.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- Compute the microinstruction width from a list of field descriptions, including non-power-of-two counts.
- Derive the CAR width and total capacity from the number and size of control memory words.
- Perform opcode-to-control-address mapping with zeros on either side and state both the address width and the address value.
- List the four sources of the next microinstruction address and the condition under which each is selected.
- Explain why nested microsubroutines require a stack and what fails with a single return register.
- Distinguish microoperation, microinstruction and microprogram in one line each.
- Identify which fields control the branch type and which control the tested condition.
- Decide the truth of statement pairs about the incrementer, mapping reload and subroutine return.
- Solve a match-the-list set on incrementer, mapping logic, subroutine register and condition field.
- Convert a polynomial in powers of 8 into binary and count ones correctly.
Attempt the sub-topic test on Control Memory and Address Sequencing first, then take the full Microprogrammed Control subject test.