RISC, CISC & Pipeline Notes
RISC, CISC & Pipeline Notes
RISC (Reduced Instruction Set Computer) is a CPU design strategy focused on simplifying the
instructions executed by a computer. The idea is to use a small set of simple instructions that
can execute in a single clock cycle, allowing for faster and more efficient processing. Here are
some key features and principles of RISC architecture:
2. Single-Cycle Execution
One of the main principles of RISC is that each instruction is executed in a single clock cycle,
which increases efficiency and speed.
5. Pipelining
Pipelining is heavily utilized in RISC architecture. It allows multiple instructions to be processed
simultaneously, with each part of the CPU handling a different stage of execution for a set of
instructions.
This leads to more efficient use of the CPU and a faster overall instruction execution.
6. Fixed-Length Instructions
RISC instructions are usually of fixed length, which simplifies decoding and aligns better with
pipelining.
7 | Department of CSE |
The Assam Kaziranga University
Computer Science and Engineering
Computer Organization & Architecture
This uniformity in instruction length helps streamline the instruction cycle and contributes to the
processor's overall efficiency.
8. Advantages of RISC
High Speed: Simplified instructions and single-cycle execution make RISC processors faster.
Efficiency in Power and Area: Reduced instructions and simpler circuitry can make RISC
processors more power-efficient.
Ease of Pipelining: Consistent instruction length and simplicity allow for efficient pipelining.
Scalability: RISC design is easily scalable, making it suitable for a wide range of applications
from embedded systems to high-performance computing.
9. Disadvantages of RISC
Dependency on Compiler: RISC systems rely on sophisticated compilers to manage code
optimization and handle complex tasks.
Limited Instruction Set: Complex operations may require multiple simple instructions, which
could lead to longer programs.
Memory Use: While efficient, the use of multiple instructions for certain operations can
sometimes increase memory usage.
RISC architecture represents a design philosophy focused on speed, simplicity, and efficiency,
playing a vital role in modern computing across various applications, especially where high
performance and energy efficiency are critical.
7 | Department of CSE |
The Assam Kaziranga University
Computer Science and Engineering
Computer Organization & Architecture
CISC (Complex Instruction Set Computer) is a CPU architecture design approach focused on
implementing a broad set of instructions, where each instruction can perform complex
operations. The goal is to minimize the number of instructions per program, even if individual
instructions take more cycles to execute. Here are the key characteristics and principles of
CISC architecture:
2. Multi-Cycle Instructions
CISC instructions are generally designed to accomplish tasks that would take multiple steps in
RISC architecture.
These instructions often take multiple clock cycles to execute but can reduce the overall
number of instructions needed for a task.
3. Memory-to-Memory Operations
CISC architecture allows instructions to directly access memory without needing to load data
into registers first.
This can simplify programming since operations can be performed directly on memory
locations, reducing the need for intermediate instructions.
4. Fewer Registers
Since CISC processors can work directly with memory, they generally require fewer
general-purpose registers than RISC.
This design allows for more complex operations at the cost of increased memory access time,
but CISC compensates for this with instructions designed to handle memory directly.
7 | Department of CSE |
The Assam Kaziranga University
Computer Science and Engineering
Computer Organization & Architecture
6. Variable-Length Instructions
CISC instructions often have variable lengths, meaning that they are not all a fixed number of
bits. This allows more flexibility in the types of instructions and operations supported.
While this can make instruction decoding more complex, it allows for a rich set of instructions
that can handle a wide range of tasks.
8. Advantages of CISC
Reduced Code Size: Complex instructions allow tasks to be completed with fewer instructions,
making the code more compact.
Easier Compiler Design: Since CISC instructions closely match high-level language constructs,
compilers have to perform fewer optimizations, simplifying compiler design.
Efficient Use of Memory: With reduced program size, less memory is needed to store
instructions, which can be advantageous in certain systems.
9. Disadvantages of CISC
Slower Instruction Execution: Due to the complexity of instructions, CISC processors may
require multiple clock cycles to execute each instruction, leading to slower execution.
Complexity in Decoding: Variable-length and complex instructions make the instruction
decoding process more complicated.
Increased Power Consumption: The complexity of CISC instructions often translates to
increased power usage, making it less suitable for power-sensitive applications.
CISC architecture provides flexibility and reduces the complexity of program code by
implementing powerful, multi-step instructions. It has traditionally been used in systems where
minimizing code size is important, although the trade-offs in power and speed have led to
increased interest in RISC approaches for many applications.
7 | Department of CSE |
The Assam Kaziranga University
Computer Science and Engineering
Computer Organization & Architecture
Pipeline
Pipelining is a technique in computer architecture that allows for the overlapping execution of
multiple instructions by breaking down the instruction execution process into separate stages.
Each stage of the pipeline processes a different part of an instruction, enabling multiple
instructions to be in different stages of execution simultaneously. This significantly improves
the throughput and overall performance of the CPU. Here are the key aspects and stages
involved in pipelining:
1. Definition of Pipelining
Pipelining is a method where multiple instructions are processed in a CPU by breaking down
instruction execution into a sequence of stages. Each stage completes part of the instruction
(e.g., fetch, decode, execute).
With pipelining, once one stage completes its task for a particular instruction, it passes that
instruction to the next stage and begins work on a new instruction.
2. Stages in a Pipeline
A typical instruction pipeline includes the following stages:
Fetch (IF): The instruction is fetched from memory.
Decode (ID): The fetched instruction is decoded to understand what operation is to be
performed.
Execute (EX): The CPU executes the operation, often involving ALU (Arithmetic Logic Unit)
operations.
Memory Access (MEM): If required, data is accessed from or written to memory.
Write-back (WB): The result is written back to a register or memory, completing the instruction
cycle.
4. Pipeline Hazards
7 | Department of CSE |
The Assam Kaziranga University
Computer Science and Engineering
Computer Organization & Architecture
Structural Hazards: Occur when hardware resources are insufficient to support all instructions
in the pipeline simultaneously. For example, two instructions might need access to memory at
the same time.
Data Hazards: Arise when instructions in the pipeline depend on the results of previous
instructions that have not yet completed. This can lead to incorrect results if not handled
properly.
Control Hazards: Occur when the pipeline must deal with branches and jumps, leading to
uncertainty about the next instruction to fetch. For example, branch instructions may change
the flow of the program, causing delays.
6. Pipeline Efficiency
Pipeline efficiency is determined by how effectively the pipeline can avoid stalls and handle
hazards.
Ideal pipeline performance is achieved when the pipeline is fully utilized, meaning each stage
is active with an instruction at all times.
7. Types of Pipelines
Instruction Pipeline: Focuses on overlapping the fetch, decode, execute, and write-back stages
for multiple instructions.
Arithmetic Pipeline: Used in CPUs for floating-point and integer arithmetic operations, breaking
down complex mathematical operations into stages for faster execution.
7 | Department of CSE |
The Assam Kaziranga University
Computer Science and Engineering
Computer Organization & Architecture
9. Advantages of Pipelining
Increased Throughput: Pipelining allows more instructions to be processed over time, resulting
in higher instruction throughput.
Efficient CPU Utilization: Pipelining keeps multiple parts of the CPU active, making more
efficient use of CPU resources.
Reduced Instruction Time: For large instruction streams, the average time per instruction
decreases as more instructions are processed in parallel.
7 | Department of CSE |