Q18Computer Architecture and Organization
Question
Explain the architecture and functioning of a Microprogrammed Control Unit in detail. Mention its advantages over hardwired control.
Answer
An exhaustive architectural analysis of Microprogrammed Control Units. Violently contrasts their ROM-based micro-instruction sequencing against rigid Hardwired logic, highlighting the massive advantages in CISC flexibility and complex instruction execution.
The Control Unit (CU) is the absolute brain of the CPU. Its sole responsibility is to aggressively read the binary Opcode of a fetched instruction and generate a highly precise sequence of electrical Control Signals (e.g., Read RAM, Enable ALU, Load Register R1) to physically execute the command. There are two overarching architectural paradigms to achieve this: Hardwired and Microprogrammed.
Instead of building a massive, chaotic physical web of logic gates, Maurice Wilkes invented Microprogramming. He proposed that the CU should essentially be a miniature computer inside the CPU.
Architectural Components
- Control Memory (ROM): The absolute core of the architecture. A high-speed Read-Only Memory embedded directly on the CPU silicon. It mathematically stores "Micro-programs" (or Micro-code). Every complex machine instruction (like
ADDorMULTIPLY) has a corresponding subroutine stored in this ROM. - Micro-Instruction: A massive, wide binary word (often 64 or 128 bits wide). Every single bit mathematically maps directly to a physical control line in the CPU (e.g., bit 5 physically connects to the ALU Add line).
- Micro-Program Counter (PC): A dedicated register that holds the physical address of the next micro-instruction to be fetched from the Control Memory.
- Control Address Register (CAR) & Control Data Register (CDR): The CAR holds the address to be read, and the fetched 128-bit micro-instruction is slammed into the CDR, where its bits instantly activate the hardware.
Execution Trace
1. The main CPU fetches a machine instruction (e.g., 0011 for MULTIPLY).
2. The Instruction Register (IR) sends this opcode to a Mapping Logic unit.
3. The Mapping Logic mathematically translates 0011 into the exact physical starting address of the MULTIPLY micro-program in the Control ROM (e.g., Address 500).
4. The PC is loaded with 500.
5. The CU executes micro-instruction 500, then 501, then 502, sequentially blasting control signals across the CPU until the complex multiplication is completely finished.
- 1. Extreme Flexibility: In a Hardwired CPU, modifying an instruction or fixing a bug requires physically redesigning and manufacturing new silicon chips (a catastrophic cost). In a Microprogrammed CPU, fixing a bug simply requires flashing a new binary file into the Control ROM. The physical silicon remains completely unchanged.
- 2. Support for CISC: Complex instructions (like those in x86 architecture) require massive sequences of control signals. Wiring this physically is mathematically chaotic and prone to failure. Microprogramming handles complex instructions effortlessly by simply writing longer micro-routines.
- 3. Emulation: A microprogrammed CPU can physically emulate an entirely different architecture. By rewriting the ROM, an Intel CPU could be mathematically forced to execute ARM instructions natively.
While Microprogramming is slightly slower than Hardwired logic (due to the ROM fetch delay), modern architectures utilize a hybrid approach: Hardwiring simple instructions for blistering speed and Microprogramming complex instructions for ultimate flexibility.