What is arithmetic pipeline ?
Firstly, pipelining is a technique of decomposing a sequential process into sub-operations, with each sub-process being executed in different dedicated segments that operate concurrently with all other segments. Simply, pipelining is a technique where multiple instructions are overlapped during execution.
Arithmetic pipeline decomposes an arithmetic problem into subproblems which are executed in various pipeline segments. They are usually found implemented in very high-speed computers. They are used for floating-point operations, multiplication of fixed-point numbers, and other various computation.
Pipeline unit for floating-point addition and subtraction
Two normalized floating-point binary numbers are given to the floating-point adder pipeline.
X= A × 2^????
X= B × 2????
A and B are mantissas
a and b are exponents
The floating-point addition and subtraction are performed in four segments. The sub-operations performed in four segments are:
- Compare the exponents.
- Align the mantissas.
- Add or subtract the mantissas.
- Normalize the results.
The flowchart for arithmetic pipeline is shown below:
The registers labeled R are placed between the segments to store the intermediate results. In the first segment, two exponents are compared and the larger of the two exponents is chosen as the result exponent. in the second, segment the difference of the two exponents decides the alignment of mantissa with smaller exponent in the right order which is done by shifting its decimal point to left. In the third segment, the addition or subtraction of mantissa takes place. In the fourth segment, the result is normalized.
Let us consider normalized floating-point numbers:
X= 0.9893 × 10^3 Y= 0.7391 × 10^2
In the first segment, two exponents are subtracted to give : 3 – 2 = 1.
Thus, the numbers with a higher exponent(i.e. 3) are chosen as an exponent of the result exponent.
The next segments align the mantissa with smaller exponent (i.e. Y)
Y= 0.07391 × 10^3
Now, the two mantissae are aligned under the same exponent. In the next segment, the addition of two mantissae is carried out which produces a sum
Z= 1.06321 × 10^3
In the last segment, the sum is normalized by shifting the mantissa.
Z= 0.106321 × 10^4
Read about the instruction pipeline.