0% found this document useful (0 votes)
56 views

Unit - Ii Micro Programmed Control: Control Memory

The document discusses microprogrammed control and how it uses a control memory to store microinstructions that are fetched and executed sequentially to control CPU operations, providing more flexibility than hardwired control. It also describes address sequencing, how microprograms break down instructions into sequences of microinstructions, and the design process for control units including using microprogramming versus hardwired approaches.

Uploaded by

Karthik Katakam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Unit - Ii Micro Programmed Control: Control Memory

The document discusses microprogrammed control and how it uses a control memory to store microinstructions that are fetched and executed sequentially to control CPU operations, providing more flexibility than hardwired control. It also describes address sequencing, how microprograms break down instructions into sequences of microinstructions, and the design process for control units including using microprogramming versus hardwired approaches.

Uploaded by

Karthik Katakam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT - II

Micro Programmed Control: Control Memory

In the context of computer architecture and microprogramming, "Control Memory"


refers to a special type of memory used in micro programmed control.

1. **Micro Programmed Control:**

- In computer architecture, the control unit is responsible for managing and


coordinating the operations of the various components within the CPU.
Microprogramming is a technique used to implement the control unit by breaking
down complex instructions into a sequence of simpler, micro-level instructions.

2. **Control Memory:**

- Control Memory, in the context of microprogramming, is a memory unit that


stores microinstructions. Microinstructions are elementary instructions that control
the internal operations of the control unit. These microinstructions are fetched and
executed in sequence to carry out the overall instruction fetched from the main
memory.

In summary, microprogrammed control uses a control memory to store


microinstructions, and the control unit fetches and executes these microinstructions
to control the operations of the CPU. This approach provides more flexibility in
designing and modifying the control unit compared to hardwired control.
Address Sequencing:

The process of generating a sequence of addresses to access the microinstructions


stored in the control memory, where the control unit executes a series of
microinstructions to carry out a machine-level instruction.

Here's how address sequencing typically works:

1. **Microinstruction Address:**

- Control memory stores microinstructions, and each microinstruction has a


unique address. The address specifies the location of the microinstruction in
control memory.

2. **Address Sequencer:**

- The control unit includes an address sequencer or a control memory address


register that generates the addresses for fetching microinstructions. This sequencer
is responsible for producing a sequence of addresses to access the
microinstructions in the correct order.

3. **Control Flow:**

- The sequence of addresses generated by the address sequencer dictates the


control flow of the microprogram. Each address corresponds to a microinstruction,
and the control unit fetches and executes microinstructions sequentially. The
address field in a microinstruction specifies the next address to be fetched,
enabling the control unit to follow the desired sequence.

In summary, address sequencing in microprogrammed control is fundamental to


controlling the various operations of the CPU and executing machine-level
instructions.
Microprogram Example:

Microprograms are SEQUENCES OF MICROINSTRUCTIONS typically


corresponds to a basic operation or control signal. Below are simplified examples
of microprograms

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.

Instruction: ADD R1, R2, R3

Microprogram:

1. Fetch instruction from main memory

2. Decode instruction to identify the operation (ADD)

3. Fetch operands from registers R2 and R3

4. Perform addition operation

5. Store the result in register R1

6. Increment the program counter for the next instruction.

THIS MICROPROGRAM BREAKS DOWN THE EXECUTION OF THE ADD


INSTRUCTION INTO A SEQUENCE OF 6 MICROINSTRUCTIONS.
Design of Control Unit:

The design of a control unit in a computer is a crucial aspect of computer


architecture. The control unit manages and coordinates the activities of various
components within the CPU to execute instructions. Here's a high-level overview
of the design process for a control unit:

### 1. **Instruction Set Architecture (ISA):**

- 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.

### 2. **Instruction Fetch:**

- 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.

### 3. **Instruction Decode:**

- Develop the instruction decode unit to interpret the fetched instructions.


Identify the operation code (opcode) and any operands specified in the instruction.

### 4. **Control Signals:**

- 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.

### 5. **Microprogramming vs. Hardwired Control:**

- Decide whether to use microprogramming or hardwired control.


Microprogramming involves using a control memory that stores sequences of
microinstructions, while hardwired control uses a network of logic gates to
generate control signals directly.
### 6. **Testing and Verification:**

- Implement simulation models or prototypes of the control unit to test its


functionality. Verify that the control unit can correctly execute a variety of
instructions from the instruction set.

### 7. **Optimization {making something (such as a design, system, or decision)


as fully perfect, functional, or effective as possible}:**

- Optimize the design for performance, considering factors such as clock cycles
per instruction and minimizing delays in the control path.

### 8. **Documentation:**

- Document the control unit design thoroughly {PLAN}, including the


instruction set, control signals, microinstructions (if applicable), and any other
relevant details.

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.

Hard Wired Control:

Hardwired control is a method of designing the control unit of a computer using a


fixed set of logic circuits, without the use of a control memory. In hardwired
control. Here are the key aspects and steps involved in the design of hardwired
control:

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.

4. **Sequential Logic (Optional):**

- Depending on the complexity of the CPU architecture, sequential logic


elements like flip-flops might be used to store the state of the control unit between
clock cycles.

5. **Testing and Verification:**

- 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:

Microprogrammed control is a method of designing the control unit in a computer's


central processing unit (CPU) using microinstructions. These microinstructions are
stored in a control memory, and each microinstruction corresponds to a set of
control signals that coordinate the operation of various components within the
CPU. Here are the key aspects and steps involved in the design of
microprogrammed control:

1. **Microinstruction Format:**

- Define the format of a microinstruction. A microinstruction typically consists of


fields that specify control signals, the next address to be fetched, and any
additional information needed for the control unit.

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.

3. **Microprogram Counter (MPC):**

- 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:**

- One advantage of microprogrammed control is its flexibility. Changes to the


instruction set or control signals can be made by updating the microinstructions in
the control memory, without the need to modify the hardware.

You might also like