BIT151 ยท 2078 ยท 5 marks
What is micro-program? Write symbolic microprogram for FETCH operation.
What is micro-program? Write symbolic microprogram for FETCH operation. [5]
Quick answer
A microprogram is a sequence of microinstructions stored in a special memory called the Control Memory (CM) or Control Store, which is used to implement the control unit of a computer.
Microprogram and Symbolic Microprogram for FETCH Operation
What is a Microprogram?
- Each microinstruction specifies one or more microoperations to be performed in a single clock cycle.
- A microprogram corresponds to a machine language instruction (like ADD, LOAD, etc.) and defines how that instruction is executed at the register-transfer level.
- The technique of using microprograms to implement the control unit is called microprogramming, introduced by Maurice Wilkes.
Key Points:
| Term | Meaning |
|---|---|
| Microoperation | A single atomic hardware operation (e.g., MAR โ PC) |
| Microinstruction | One step in the microprogram containing one or more microoperations |
| Microprogram | A complete sequence of microinstructions for one machine instruction |
| Control Memory | ROM/RAM where microprograms are stored |
FETCH Operation (Instruction Fetch Cycle)
The FETCH cycle retrieves an instruction from memory and prepares the CPU to execute it. The steps involved are:
- Transfer the content of PC to MAR (Memory Address Register)
- Initiate a memory read; increment PC
- Transfer the fetched instruction from MDR to IR (Instruction Register)
- Decode the instruction and determine the next microprogram address
Symbolic Microprogram for FETCH
Label Microoperations Comments
------- ---------------------------- -------------------------
FETCH: MAR โ PC Transfer PC to MAR
MDR โ M[MAR], PC โ PC + 1 Read memory; increment PC
IR โ MDR Load instruction into IR
DECODE IR; Go to next routine Decode opcode; branch
Step-by-step Explanation:
| Step | Microinstruction | Description |
|---|---|---|
| 1 | MAR โ PC | The address of the next instruction (held in PC) is copied to MAR so memory can be addressed |
| 2 | MDR โ M[MAR] | Memory is read; the instruction at the address in MAR is placed in MDR |
| 2 | PC โ PC + 1 | PC is incremented to point to the next instruction (can be done in parallel with memory read) |
| 3 | IR โ MDR | The fetched instruction is transferred from MDR to the Instruction Register |
| 4 | DECODE IR | The opcode in IR is decoded to determine which microprogram routine to execute next |
Summary
A microprogram is a set of microinstructions stored in control memory that implements a machine instruction by specifying register-level operations step by step. The FETCH microprogram reads the instruction from memory using PC โ MAR โ MDR โ IR, increments PC, and decodes the opcode to branch to the appropriate execution routine.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.