Top Banner
Lecture - ACA Prof. K M Al-Aubidy Advanced Computer Architecture (0630561) Lecture 5 Arithmetic Pipelining Prof. Kasim M. Al-Aubidy Computer Eng. Dept.
14

Lecture 5 Arithmetic Pipelining - Philadelphia · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Feb 03, 2018

Download

Documents

duongthuy
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy١

Advanced Computer Architecture(0630561)

Lecture 5

Arithmetic Pipelining

Prof. Kasim M. Al-AubidyComputer Eng. Dept.

Page 2: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٢

Arithmetic Pipelines:Fixed Point Addition Pipeline:

Page 3: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٣

Page 4: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٤

Fixed Point Multiplication Pipeline:• A pipelined multiplier based on the digit products can be designed

using digit product generation logic and the digit adders.Example:25 * 35 = 875

Now for binary multiplication:A = a1 a0B = b1 b0

Page 5: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٥

Multiplier Based on Digit Products:

Page 6: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٦

Floating Point Multiplication Pipeline:FP multiplication involves the following three major steps:

1. Multiplication of fractions.2. Addition of exponents.

3. Normalization of the result.• Since fractions and exponents are fixed-point numbers, the steps 1 & 2 can

be implemented using the principles discussed before. Normalization stepcan be implemented as given in the floating point addition.

Floating Point Division Pipeline:• Division operation appears less frequently in computer programs

compared to addition subtraction and multiplication and hence separatepipeline unit for the division is seldom implemented. It is common toschedule the division using adder and multiplier pipelines.

Page 7: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٧

Page 8: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٨

Page 9: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy٩

Recurrence Computations:• The recurrence formula expresses how to compute a sequence of numbers

(Vector X) from another sequence of numbers (Vector A). A pipeline tocompute the vector X should ideally take one element of A and produce oneelement of X, as illustrated in this example:

321

4

4321

21

211

1

−−−

−−−−

−−

−−−

+++=+=

++++=++=

+=+=

iiiii

iii

iiiiii

iiii

iii

iii

aaaabXbX

XaaaaXXaaX

XaXXaX

Page 10: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy١٠

• This pipeline computes b’s using only TWO pipes and third pipecomputes the X’s.

• This pipeline has 12 stages and computes one X every clock cycle witheach new value provided on the input

Page 11: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy١١

Example: the instruction cycle can be implemented as a sequence ofa basic steps;

Page 12: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy١٢

• The instructions may be classified into groups such that a group representsthe similarity in the use of stages by all the instructions in the group. It iseasy to characterize the groups from the overall function they present. Thefollowing groups are:Group 1: add like instructions. Group 2: branch instructions.

Page 13: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy١٣

Group 3: register to register Group 4: store instructions.instructions.

Page 14: Lecture 5 Arithmetic Pipelining - Philadelphia  · PDF fileˇ Prof. K M Al-Aubidy ACA- Lecture Arithmetic Pipelines: Fixed Point Addition Pipeline:

Lecture٥-ACAProf. K M Al-Aubidy١٤

Pipeline Instruction Processing: Some Issues