Presentation is loading. Please wait.

Presentation is loading. Please wait.

What You Have Always Wanted to Know about FP Hardware Implementation (But Were Afraid to Ask) Acknowledgements: Based on Prof. Shaaban lecture notes, Prof.

Similar presentations


Presentation on theme: "What You Have Always Wanted to Know about FP Hardware Implementation (But Were Afraid to Ask) Acknowledgements: Based on Prof. Shaaban lecture notes, Prof."— Presentation transcript:

1 What You Have Always Wanted to Know about FP Hardware Implementation (But Were Afraid to Ask) Acknowledgements: Based on Prof. Shaaban lecture notes, Prof. M. Flynn and S. Oberman’s lecture notes, and past work on the SNAP project Nhon Quach

2 3/23/2003EE270 Special Lecture on FP Arithmetic2 Outline IEEE 754 Standard – Motivations and implementation challenges Common implementation practices in current FP adders and multipliers Advanced implementation topics (based on the Stanford SNAP project)

3 3/23/2003EE270 Special Lecture on FP Arithmetic3 IEEE Standard Motivations Enhance portability of math libraries Preserve simple mathematical properties such as a*b = b*a Graceful degradation through support of denormalized numbers Multiple rounding modes for better rounding bias (RN) and interval arithmetic (RP and RM) Well worth the complexity and cost in hardware

4 3/23/2003EE270 Special Lecture on FP Arithmetic4

5 3/23/2003EE270 Special Lecture on FP Arithmetic5

6 3/23/2003EE270 Special Lecture on FP Arithmetic6

7 3/23/2003EE270 Special Lecture on FP Arithmetic7

8 3/23/2003EE270 Special Lecture on FP Arithmetic8

9 3/23/2003EE270 Special Lecture on FP Arithmetic9

10 3/23/2003EE270 Special Lecture on FP Arithmetic10 FP Addition Algorithm (the 1 st time)

11 3/23/2003EE270 Special Lecture on FP Arithmetic11

12 3/23/2003EE270 Special Lecture on FP Arithmetic12

13 3/23/2003EE270 Special Lecture on FP Arithmetic13

14 3/23/2003EE270 Special Lecture on FP Arithmetic14

15 3/23/2003EE270 Special Lecture on FP Arithmetic15

16 3/23/2003EE270 Special Lecture on FP Arithmetic16

17 3/23/2003EE270 Special Lecture on FP Arithmetic17

18 3/23/2003EE270 Special Lecture on FP Arithmetic18

19 3/23/2003EE270 Special Lecture on FP Arithmetic19 Why Need Direct Hardware Support?

20 3/23/2003EE270 Special Lecture on FP Arithmetic20

21 3/23/2003EE270 Special Lecture on FP Arithmetic21 Latency and Throughput of Various FP Units

22 3/23/2003EE270 Special Lecture on FP Arithmetic22 FP Addition Algorithm (The 2 nd Time)

23 3/23/2003EE270 Special Lecture on FP Arithmetic23

24 3/23/2003EE270 Special Lecture on FP Arithmetic24 Predict the number of 0’s in the result based on the significands Result needs 2’s complemented before normalization

25 3/23/2003EE270 Special Lecture on FP Arithmetic25 Leading One Prediction (LOP) Detect the patterns of Z*, T*GZ, G*, and T*ZG*, where Z=a’b’, T=a xor b, G=ab, and Z* means any number of Z’s.

26 3/23/2003EE270 Special Lecture on FP Arithmetic26

27 3/23/2003EE270 Special Lecture on FP Arithmetic27 Note the use of “.” notation Multiplicand Multiplier Partial Product Carry and Sum (CPA) Round Final Significand

28 3/23/2003EE270 Special Lecture on FP Arithmetic28

29 3/23/2003EE270 Special Lecture on FP Arithmetic29

30 3/23/2003EE270 Special Lecture on FP Arithmetic30

31 3/23/2003EE270 Special Lecture on FP Arithmetic31 Sign Extension Trick (Favorite Interview Question) ssssssss ssssss ssss ss 1 1 11 11 1 s Adding the 1’s does not change the value of significand Sum of sign and 1 is negative of sign

32 3/23/2003EE270 Special Lecture on FP Arithmetic32 Many Ways to Build A Tree

33 3/23/2003EE270 Special Lecture on FP Arithmetic33 Many Types of Counters Too 3-2 counters 7-3 counters 9-2 counters Binary tree, ZM trees, overturned Staircase trees, etc.

34 3/23/2003EE270 Special Lecture on FP Arithmetic34 FP Addition Algorithm (The 3 rd Time)

35 3/23/2003EE270 Special Lecture on FP Arithmetic35 Advanced FP Addition Algorithm N. Quach & M. Flynn, SNAP Addition Algorithm, Stanford, 1991

36 3/23/2003EE270 Special Lecture on FP Arithmetic36 Summary Fast FP adder tricks: two path implementation, LOP, and integrated rounding Fast FP multiplier tricks: sign extension (elimination) logic, partial reduction tree, rounding, and Booth’s encoding

37 3/23/2003EE270 Special Lecture on FP Arithmetic37 To Probe Further Arith.stanford.edu (lots of technical reports and papers on FP adder, multiplier, and divider implementation) IEEE 754 standard specification David Goldberg, “What Every Computer Scientist Should Know About Floating-Point Arithmetic,” ACM Computing Surveys, 23(1), 5-48 W. Kahan, “IEEE Standard 754 for Binary Floating-Point Arithmetic,” Lecture notes on the status of IEEE 754 standard


Download ppt "What You Have Always Wanted to Know about FP Hardware Implementation (But Were Afraid to Ask) Acknowledgements: Based on Prof. Shaaban lecture notes, Prof."

Similar presentations


Ads by Google