0% found this document useful (0 votes)
20 views7 pages

Pipeline Basic Concept

Pipelining is a technique in computer architecture that allows multiple instructions to be executed simultaneously by dividing the execution process into stages. Each stage performs a specific part of the operation, improving overall throughput while maintaining the flow of data through pipeline registers. Despite challenges such as hazards and increased complexity, pipelining is essential for enhancing performance in modern processors and various digital applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

Pipeline Basic Concept

Pipelining is a technique in computer architecture that allows multiple instructions to be executed simultaneously by dividing the execution process into stages. Each stage performs a specific part of the operation, improving overall throughput while maintaining the flow of data through pipeline registers. Despite challenges such as hazards and increased complexity, pipelining is essential for enhancing performance in modern processors and various digital applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Digital Design & Computer Organization BCS302

Pipeline Basic Concept


Introduction

What is Pipelining?

Pipelining is the process of accumulating instruction from the processor through a


pipeline. It allows storing and executing instructions in an orderly process. It is
also known as pipeline processing.

Pipelining is a technique where multiple instructions are overlapped during


execution. Pipeline is divided into stages and these stages are connected with one
another to form a pipe like structure. Instructions enter from one end and exit from
another end.

Pipelining increases the overall instruction throughput.

In pipeline system, each segment consists of an input register followed by a


combinational circuit. The register is used to hold data and combinational circuit
performs operations on it. The output of combinational circuit is applied to the
input register of the next segment.

Pipeline Basic Concepts Page 1


Digital Design & Computer Organization BCS302

Pipeline system is like the modern day assembly line setup in factories. For
example in a car manufacturing industry, huge assembly lines are setup and at each
point, there are robotic arms to perform a certain task, and then the car moves on
ahead to the next arm

Pipeline in Digital Design

A pipeline is a sequence of stages, each performing a part of an operation, such as


executing an instruction. Instead of completing one instruction at a time, a pipeline
allows multiple instructions to be in different stages of execution simultaneously,
improving throughput.

Key Concepts

 Stages: The pipeline is divided into multiple stages, with each stage
handling a specific part of the task (e.g., fetching, decoding).
 Pipeline Registers: Registers are placed between stages to hold intermediate
results and synchronize data flow.
 Clock Cycle: Each stage completes its task within a clock cycle, and data
progresses to the next stage at the clock edge.
 Throughput: The number of instructions completed per unit of time
increases, although latency (time to complete a single instruction) may
remain unchanged.

Basic Stages of a Processor Pipeline

In a typical instruction pipeline (used in CPUs), there are five stages:

1. Instruction Fetch (IF):

Pipeline Basic Concepts Page 2


Digital Design & Computer Organization BCS302

o Fetch the instruction from memory.

2. Instruction Decode (ID):

o Decode the instruction and determine the required operations and


operands.

3. Execute (EX):

o Perform the operation (e.g., arithmetic or logic operation).

4. Memory Access (MEM):

o Access memory if the instruction requires reading or writing data.

5. Write Back (WB):

o Write the result back to a register.

Types of Pipeline

 Arithmetic Pipelines: Used in ALUs for arithmetic operations like addition,


multiplication, etc.
 Instruction Pipelines: Used in CPUs for instruction processing.
 Graphics Pipelines: Found in GPUs for rendering and image processing
tasks.

1. Arithmetic Pipeline

2. Instruction Pipeline

Pipeline Basic Concepts Page 3


Digital Design & Computer Organization BCS302

Arithmetic Pipeline Arithmetic pipelines are usually found in most of the


computers. They are used for floating point operations, multiplication of fixed
point numbers etc. For example: The input to the Floating Point Adder pipeline is:

X = A*2^a
Y = B*2^b

Here A and B are mantissas (significant digit of floating point numbers), while a
and b are exponents.

The floating point addition and subtraction is done in 4 parts:


1. Compare the exponents.
2. Align the mantissas.
3. Add or subtract mantissas
4. Produce the result.
Registers are used for storing the intermediate results between the above operations

Instruction Pipeline

In this a stream of instructions can be executed by overlapping fetch, decode and


execute phases of an instruction cycle. This type of technique is used to increase
the throughput of the computer system.

An instruction pipeline reads instruction from the memory while previous


instructions are being executed in other segments of the pipeline. Thus we can
execute multiple instructions simultaneously. The pipeline will be more efficient if
the instruction cycle is divided into segments of equal duration.

Pipeline Basic Concepts Page 4


Digital Design & Computer Organization BCS302

Benefits of Pipelining

 Increased Throughput: Multiple instructions are processed simultaneously.


 Efficient Resource Utilization: Different stages can use different parts of
the processor.
 Faster Execution: Speeds up repetitive or sequential operations

Challenges in Pipelining

 Hazards: Situations that cause the pipeline to stall or produce incorrect


results.
o Data Hazard: When instructions depend on the results of previous
instructions.
o Control Hazard: When a branch or jump instruction alters the flow
of execution.
o Structural Hazard: When two instructions compete for the same
hardware resource.
 Pipeline Overhead: The need for pipeline registers and control logic can
increase complexity.
 Balancing Stages: Ensuring that each stage takes approximately the same
time.

Example: Instruction Pipeline with Overlapping Execution

Without Pipelining:

1. Instruction 1: Fetch → Decode → Execute → Memory → Write Back


2. Instruction 2: Starts only after Instruction 1 finishes.

Pipeline Basic Concepts Page 5


Digital Design & Computer Organization BCS302

With Pipelining:

1. Clock Cycle 1: Fetch (Instruction 1)


2. Clock Cycle 2: Decode (Instruction 1), Fetch (Instruction 2)
3. Clock Cycle 3: Execute (Instruction 1), Decode (Instruction 2), Fetch
(Instruction 3)
4. And so on...

Real-World Application

 Superscalar Processors: Use multiple pipelines to execute more than one


instruction per clock cycle.
 Out-of-Order Execution: Modern CPUs dynamically rearrange instruction
execution to avoid hazards while keeping the pipeline full.
 Parallel Processing: Pipelines are critical for designing multicore
processors and GPUs.

In digital design, pipelines are not only used in processors but also in digital
signal processing (DSP), networking hardware, and custom digital circuits to
optimize performance

Pipeline Basic Concepts Page 6


Digital Design & Computer Organization BCS302

Conclusion
Pipelining is a cornerstone of digital design and computer organization, offering
significant performance improvements in modern processors and systems. Despite
challenges like hazards and design complexity, pipelining remains an
indispensable technique for achieving high-speed and efficient computation in
various applications.

Pipeline Basic Concepts Page 7

You might also like