Unit - Ii Micro Programmed Control: Control Memory
Unit - Ii Micro Programmed Control: Control Memory
2. **Control Memory:**
1. **Microinstruction Address:**
2. **Address Sequencer:**
3. **Control Flow:**
Let's consider a instruction "ADD R1, R2, R3" which adds the contents of registers
R2 and R3 and stores the result in register R1.
Microprogram:
- Understand the instruction set architecture of the target computer. This includes
the types of instructions, addressing modes, and the format of instructions that the
control unit needs to support.
- Design the instruction fetch unit to fetch instructions from memory. This
involves specifying the size of the instruction register, the program counter, and
the mechanism for retrieving instructions from memory.
- Determine the control signals needed to execute each instruction. These signals
will control various components of the CPU, such as the ALU (Arithmetic Logic
Unit), registers, and data paths.
- Optimize the design for performance, considering factors such as clock cycles
per instruction and minimizing delays in the control path.
### 8. **Documentation:**
The design of the control unit is closely tied to the overall architecture of the
computer system, and it requires a careful balance between simplicity, speed, and
flexibility. The chosen design influences the performance and capabilities of the
entire computer.
1. **Opcode Decoding:**
- The first step in hardwired control is to decode the opcode of the instruction.
The opcode is a part of the instruction that specifies the operation to be performed.
2. **Control Signal Generation:**
- Based on the decoded opcode, design logic circuits that generate the necessary
control signals to coordinate the activities of various components in the CPU.
These control signals activate or deactivate specific functional units, such as the
ALU, registers, and data paths.
3. **Combinational Logic:**
- The control signals are typically generated using combinational logic circuits,
such as AND gates, OR gates, and multiplexers. The logic circuits take the
decoded opcode and produce the appropriate control signals based on the
instruction's requirements.
- Simulate and test the hardwired control design to ensure that it correctly
generates the required control signals for a variety of instructions. Verification is
crucial to confirm that the control unit behaves as expected and follows the
instruction set architecture.
Hardwired control has the advantage of simplicity and can be faster than
microprogrammed control since there is no need to fetch microinstructions from a
control memory. However, it can be less flexible than microprogramming because
any changes to the instruction set or control signals may require physical changes
to the hardware.
It's worth noting that modern computer architectures often use a combination of
hardwired and microprogrammed control to achieve a balance between flexibility
and efficiency.
Microprogrammed Control:
1. **Microinstruction Format:**
2. **Control Signals:**
- Identify the control signals needed for the CPU to execute each instruction.
Assign specific values to these control signals in the microinstructions to
coordinate the activities of the CPU components, such as the ALU, registers, and
data paths.
- Implement the microprogram counter, which keeps track of the address of the
current microinstruction. The microprogram counter is updated based on the
sequencing logic.
4. **Flexibility:**