### Pipeline Processing or Pipelining

Pipelining is the process of accumulating instruction from the processor through a pipeline. A  pipeline is the continuous and somewhat overlapped movement of instruction to the processor or in the arithmetic steps taken by the processor to perform an instruction. Pipelining is the use of a pipeline. It allows storing and executing instructions in an orderly process. It is also known as pipeline processing. Without a pipeline, a computer processor gets the first instruction from memory, performs the operation it calls for, and then goes to get the next instruction from memory, and so forth. While fetching the instruction form memory, the arithmetic part of the processor is idle. It must wait until it gets the next instruction. With pipelining, the computer architecture allows the next instructions to be fetched while the processor is performing arithmetic operations, holding them in a buffer close to the processor until each instruction operation can be performed. The staging of instruction fetching is continuous. The result is an increase in the number of instructions that can be performed during a given time period.

Pipelining does not decrease the time for individual instruction execution. Instead, it increases instruction throughput. The Throughput of the instruction pipeline is determined by how often an instruction exits the pipeline.

We can compare Pipelining with a manufacturing assembly line in which different parts of a product are being assembled at the same time although ultimately there may be some parts that have to be assembled before others are. Even if there is some sequential dependency, the overall process can take advantage of those operations that can proceed concurrently.

Any operation that can be divided into sequence of suboperations are nearly the same complexity that can be implemented by using a pipeline processor. The Pipeline method is efficient for only those applications that require to repeat the same operation many times with different sets if data. The general structure of a four-segment pipeline is shown in below figure.

Figure : Four Segment Pipeline

The Operands pass with the help of all four segments in a fixed sequence. Each segment made up of a combinational circuit Si that does a suboperation over the data stream passes through the pipe. The segments are divide by registers Ri that store the intermediate results between the stages. Information transfer between adjacent stages under the control of common clock given to all the registers at the same time. The nature of a pipeline can be shown with space-time diagram. This is a diagram that represent the segment utilization as a function of time. The space-time diagram of a four segment pipeline is shown in below figure.

The horizontal axis represent represent the time in clock cycles and the vertical axis provides the segment number. The above diagram displays six task T1 to T6 executed in four segments. At the beginning, task T1 is handled by segment 1. After the first clock, segment 2 is actively engaged with task T1, while segment 1 is actively engaged with task T2. Forwards in this manner, the first task T1 is finished after the fourth clock cycle. After this, pipe finished a task every clock cycle. Without considering the number of segments there are in system, once the pipeline is completed, it takes only one clock period to get an output.

Now assume that a k-segment pipeline with a clock cycle time tp is used to execute n tasks. The first task T1 need a time equal to ktpto finish its operation as there are k segments in the pipe. the remaining n-1 tasks combines from the pipe at the rate of one task per-clock cycle and they will be finished after a time equal to (n-1)tp. So, to finish n tasks using a k-segment pipeline needs k+(n-1) clock cycles. For example, the above figure represents four segments and 6 tasks. The time needed to finish all the operations is 4 + ( 6 - 1 ) = 9 clock cycles, as denoted in the above diagram.

Let consider a non-pipeline unit that performs the same operation and takes a time equal to tn to complete each task. The total time required for n tasks is n⋅tn. The speedup of a pipeline processing over an equivalent non- pipeline processing is defined by the ratio:

Types of Pipelining :

The Pipelining is divided into two categories
• Arithmetic Pipeline
• Instruction Pipeline

Next Topic :