Professional Documents
Culture Documents
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:**
2. **Cell:**
3. **Memory Address:**
4. **Memory Capacity:**
7. **Types of RAM:**
- **SRAM (Static RAM):** Does not need refreshing, and data is stored in
flip-flops. SRAM is faster but more expensive and consumes more power
than DRAM.
Read-Only Memories
1. **Permanent Data:**
2. **Startup Instructions:**
4. **Security Features:**
- A **cache hit** occurs when the CPU requests data that is already
present in the cache.
- A **cache miss** occurs when the CPU requests data that is not in the
cache, requiring the data to be fetched from the slower main memory.
Minimizing cache misses and maximizing cache hits are critical for
improving performance.
3. **Cache Size:**
- The size of the cache memory is a crucial factor. Larger caches can store
more data BUT MAY HAVE LONGER ACCESS TIMES. Finding the
right balance is essential.
- Modern processors often have multiple levels of cache (L1, L2, and
sometimes L3). Each level serves as a progressively larger but slower cache.
Optimizing the use of each level is crucial for overall system performance.
- When a cache is full and a new item needs to be loaded, a decision must
be made about which existing item to evict. Cache replacement policies like
LRU (Least Recently Used) or FIFO (First In, First Out) impact the
effectiveness of the cache.
7. **Cache Prefetching:**
- Prefetching is a technique where the cache predicts and loads data into
the cache before it is actually needed. This helps to reduce cache misses.
Virtual Memories Secondary Storage
**Virtual Memory and Secondary Storage:**
### 1. **Overview:**
- **Virtual Memory:**
- **Secondary Storage:**
- **Page Fault:**
- When a requested page is not in RAM, a page fault occurs, and the
required page is loaded from the page file into RAM.
- **Paging:**
- **Segmentation:**
### 5. **Advantages:**
- Allows the execution of larger programs that may not fit entirely into
physical memory.
- **Ease of Multitasking:**
### 6. **Challenges:**
- **Page Faults:**
- Replaces the page that has not been used for the longest time.
- **FIFO (First-In-First-Out):**
- **Performance Improvement:**
- **Data Striping:**
- Divides data into blocks and writes these blocks across multiple drives
simultaneously for improved speed.
- **Advantages:**
- **Disadvantages:**
- **RAID 1 (Mirroring):**
- **Mirroring:**
- **Advantages:**
- **Disadvantages:**
- **Advantages:**
- **Disadvantages:**
### **Applications:**
- **Data Centers:**
- RAID is commonly used to ensure data availability and prevent data loss
in large-scale storage environments.
- **Servers:**
- **Personal Computers:**