×

Pipelining: Computer Organization and Architecture

Introduction to Pipelining

Before learning pipeline, we have to understand about the Parallel processing.

Parallel processing is the processing of data simultaneously. There are three techniques of parallel processing.

Types of Processing:

  1. Vector Processing
  2. Array Processing
  3. Pipeline Processing(Pipelining)

Flynn’s Classification of Computers

Flynn's gave the classification of computers based on their capability and architecture. He classified computers based on how computers operate.

  1. SISD – Single instruction stream, single data stream

These SISD types of computers are a very simple type of computers that will fetch one cycle with one instruction and execute an instruction with one data. So, at a particular time, one data is fetched, and one instruction is executed. For example, Von Neumann computers take one instruction at a time and execute that at a time.  

  • SIMD – Single instruction Stream, Multiple data stream.

These computers take single instruction with multiple data streams means the system is taking one input or fetching one instruction, but the execution of instruction will be parallel. One instruction is fetched at one time and send for execution; again, the second instruction is fetched and send for execution parallel with the first one, and it continues. So the instruction is fetched once, and multiple instructions can be executed parallelly, for example, Pipeline processing in which one instruction is fetched at one time. Still, multiple processing of execution of instructions takes place.

  • MISD-  Multiple instruction streams, single data stream

In this type of system, multiple instructions are fetched, and only one instruction is executed. Suppose four instructions are fetched together, and one is sent for execution, and in the meantime, three-four instructions are fetched. Now there are a total of 7 instructions piled up, which decrease the performance of the system. So, these kinds of systems are of no use. For example, This is only hypothetical; there are no computers implemented based on MISD.

  • MIMD – Multiple instruction streams, multiple data stream

In this type of system, multiple instructions are fetched at a time, and multiple instructions are executed. So, to fetch multiple instructions simultaneously, multiple pipelines are applied. This MIMD has multiple pipelines in the system, and examples of such computers are Superscalar computers having ILP (instruction-level parallelism).

Where pipelining is applicable?

Pipelining is applicable and useful when the same processing is applied over multiple inputs. Pipelining gives a better result on multiple inputs; one same kind of processing is applied every time. For example:- a particular assembly line in manufacturing, in some production unit where car and bike are assembled, so the procedure is same that one part is taken, assembled at a particular place and then other part and then other in a sequence.

Definition: Pipelining is the technique to decompose a sequential process into small- small sub-operations, and sub-operations are performed in segments. There is a separate segment available to perform each sub-operation, and one operation is performed in all the segments called a task.

For example: Suppose there is a manufacturing unit that manufactures the shirts. Only one person manufactures the shirt so, it has to do all the operations like cutting the shirt, stitching the shirt, finishing the shirt and packing the shirt. Still, one task is divided into four subtasks with an increase in orders, and one person is appointed for one particular task (cutting, stitching, finishing and packing). Four hardware are working on small- small sub-operations.

“Each segment can perform its respective sub-operation over different input in parallel to other segments”.

So, if ‘n’ number of inputs are provided in pipelining, the ' n' number of the task will be performed in pipelining.   

Pipelining Cycle time

Pipelining cycle time is the minimum time in which all the segments can perform their respective sub-operation. It is that respective time in which all the stages of pipelining perform their sub-operations.

Pipeline time is denoted as Tp.

Note: Consider a k segment pipeline with clock cycle time =tp to perform n number of tasks. How much time is required to perform the first task in the pipeline, or how much time pipeline will give the first output?

The time required to perform 1st task = k * tp

Time required to perform remaining (n-1) tasks = (n-1) tp

Time required for all n tasks = (k +n -1) tp

So, (k +n-1) tp is the total number of cycles performed.

Note:- Consider a non- pipeline system that takes  tn time to perform a task

 The time required for n task = n*tn (because this particular system is a non-pipelined sequential system)

Speed Up Ratio performs a pipeline. Speed up ratio is the result of performance gain (how fast the pipeline system works) as compared to the non- pipeline system. How many times the pipeline is faster than the non- pipeline. If the speed-up ratio is 2, then the pipeline system is two times faster than the non-pipeline system.

 The formula of Speed Up Ratio = Non- pipeline time.

                                                   Pipeline time

                      S =    n * tn

                            (k +n -1) tp

  • As the number of tasks increases, n" k ( here k-1 is ignored from the formula)         

                     Sideal = tn

                                tp

          So this is the ideal case( because k-1 cycles are ignored to fill the pipe)

                     For 1 input = 1 cycle is required.

          Hence, the total n number of cycles required for n processing so the total time for n number of operations will be Sideal, and this is also known as maximum speed up  Smax, which can be achieved in an ideal case.

Note:- Special case which is not true always.

Case: Suppose, to perform 1 task, pipeline and non- pipeline system take equal time.

             Tn = k* tp

             Sideal = K  (value of speed up is never greater than k ion if it can be less or equal to k).

So, to find the maximum speed up ratio, always use this formula.

Types of Pipeline

  1. Hardware pipelining
  2. Software pipelining
  3. Arithmetic pipelining
  4. Instruction pipelining

Hardware pipelining

Hardware pipelining helps designer to manage complexity where the complex task is divided into smaller tasks which are more manageable. It offers a high-performance system.

Software pipelining

Software pipelining helps in handling complex instructions, and it allows programs to be reused.

Arithmetic Pipeline

Arithmetic pipelines are found in very high-speed computers. They are used to perform high-speed floating-point operations like addition, multiplication and division. Multiple ALU's are built into the system to perform arithmetic operations parallelly in various data formats. In arithmetic, pipelining registers are used to store the intermediate results among the operations.

Registers are used for storing the intermediate results between the above operations.


Instruction Pipeline

In instruction pipelining, instruction is once fetched one by one, and at one clock cycle, one instruction is read from memory while previous instructions are being executed. Due to this, we can execute multiple instructions simultaneously. Instruction pipelining follows an instruction cycle to execute the instruction consisting of various phases divided into segments of equal duration. Instruction pipelining is further explained in detail on the next page.

Advantages and Disadvantages of Pipelining

                 Advantages                  Disadvantages
Pipelining is widely used in modern systems (processors)Involvement and adding of hardware increases the cost of the system.
The pipeline helps in reducing the cycle time of the processor.     The instruction latency is more.
Systems become faster and reliable.     It requires complex complication techniques.
Throughput of the system increases, which makes the system more efficient. 
Hardware is arranged in such a way that more than one operation can be performed simultaneously. 
Useful for application where one task is repeated with a different set of data. 

Related Topics

Assembly Language Register

Assembly Language Register Assembly language was introduced during the late 1940s in the second generation. It is a low-level language that helps in communication between the user and the computer. It...

6 minutes read.

Advantages and Disadvantages of Flash Memory

What is Flash Memory? Electrically Erasable Programmable Read-Only Memory (EEPROM) and Erasable Programmable Read-Only Memory (EPROM) are used for flash memory (EEPROM). Although technically the word flash is used in the industry...

3 minutes read.

Computer Organization and Architecture Tutorial

Introduction to Computer Organization and Architecture In this modern era, or we can say computer era, Technology from all around surrounds us. Human is conserved, connected and absorbed by Technology. From...

4 minutes read.

Instruction Pipelining and Pipeline Hazards

Instruction Pipelining and Pipeline Hazards To apply pipeline, the prerequisite is to perform the same processing over multiple inputs, then pipelining is important. So instruction execution is the best example for...

10 minutes read.

Interfacing DAC with the 8051 Microcontroller

A wide range of applications calls for microcontrollers, including measuring and controlling physical quantities like temperature, pressure, speed, and distance. In these systems, the microcontroller creates digital output, but the controlling...

2 minutes read.

Digital Number System

Digital Number System: The computer understands digital language only. Many number systems are used in digital technology. The most common are Decimal, Binary, Octal and Hexadecimal number systems. Types of the...

7 minutes read.

Local Broadcast Address and loopback address

In computer networking, if you send the data from one source to another source or group of sources in the form of packets, then this is called casting. We can categorize...

3 minutes read.

Biconnectivity in a Graph

What is a Graph? A graph is a structure where values are stored at the vertex, and the relation between vertices is denoted by edges. In a graph, if there is only...

4 minutes read.

Data Path, ALU and Control Unit

Data Path, ALU(Arithmetic Logic Unit) and Control Unit What is the Data path? Suppose any data processing operation should be performed in the CPU like transferring the content of register from one...

5 minutes read.

Data Transfer and Manipulation

What is Data Transfer? In computer architecture, data transfer refers to the movement of data between different components within a computer system. These components can include the central processing unit (CPU),...

6 minutes read.

CarryLook Ahead Adder

What is Adder? Adder is the combinational circuit that is used to add the bits in digital electronics. As we know, in the digital system, every number is represented in the...

4 minutes read.

Pipelining: Computer Organization and Architecture

Introduction to Pipelining Before learning pipeline, we have to understand about the Parallel processing. Parallel processing is the processing of data simultaneously. There are three techniques of parallel processing. Types of Processing: Vector ProcessingArray...

7 minutes read.

Machine Instructions

What is a Digital Computer? A computer that takes input in a binary form and produces output in binary form. The question arises of what kind of input the computer takes...

4 minutes read.

74138 IC DECODER

74138 DECODER Decoder A combinational circuit called a decoder can have up to 2n output lines and 'n' input lines. When a decoder is enabled, depending on the mix of inputs,...

4 minutes read.

Ethernet Frame Format

What is Ethernet? As we know in computer networking, LAN (Local Area Network) is used to connect devices in limited geographical areas like schools or a building.LAN uses different topologies (arrangement...

3 minutes read.

Control Unit Organization

Control Unit Organization The Control Unit is the unit in the CPU, which controls the various components like input  & output devices, logic unit and memory. The Control Unit is the...

7 minutes read.

Control Signals in 8155 Microprocessor

Intel designed the chip 8155 used to interface with I/O devices. Basically, the 8085 microprocessor is directly unable to deal with its peripheral input output devices for reading data or...

3 minutes read.

Addressing mode in 8085 microprocessor

What is a Microprocessor? Microprocessor is a unit which is able to perform arithmetic and logical operations and is built on a single chip. The 8085 microprocessor is built by Intel which...

4 minutes read.

8085 Pin Configuration

Introduction: Intel 8085 is consist 40 pin IC. The pin name of 8085 is A8 – A15; AD0 – AD7; ALE; IO/M; S0, S1; RD; WR; READY; HOLD; HLDA; INTR; INTA;...

6 minutes read.

Convert a number from base 2 to base 6

Base 2 Base 2 is the format where you can represent any number with just two values which are 0 and 1. With the help of 0s and 1s, we can...

4 minutes read.