1 / 37

Nhon Quach

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. Outline.

jory
Télécharger la présentation

Nhon Quach

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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) EE270 Special Lecture on FP Arithmetic

  3. 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 EE270 Special Lecture on FP Arithmetic

  4. EE270 Special Lecture on FP Arithmetic

  5. EE270 Special Lecture on FP Arithmetic

  6. EE270 Special Lecture on FP Arithmetic

  7. EE270 Special Lecture on FP Arithmetic

  8. EE270 Special Lecture on FP Arithmetic

  9. EE270 Special Lecture on FP Arithmetic

  10. FP Addition Algorithm (the 1st time) EE270 Special Lecture on FP Arithmetic

  11. EE270 Special Lecture on FP Arithmetic

  12. EE270 Special Lecture on FP Arithmetic

  13. EE270 Special Lecture on FP Arithmetic

  14. EE270 Special Lecture on FP Arithmetic

  15. EE270 Special Lecture on FP Arithmetic

  16. EE270 Special Lecture on FP Arithmetic

  17. EE270 Special Lecture on FP Arithmetic

  18. EE270 Special Lecture on FP Arithmetic

  19. Why Need Direct Hardware Support? EE270 Special Lecture on FP Arithmetic

  20. EE270 Special Lecture on FP Arithmetic

  21. Latency and Throughput of Various FP Units EE270 Special Lecture on FP Arithmetic

  22. FP Addition Algorithm (The 2nd Time) EE270 Special Lecture on FP Arithmetic

  23. EE270 Special Lecture on FP Arithmetic

  24. Predict the number of 0’s in the result based on the significands Result needs 2’s complemented before normalization EE270 Special Lecture on FP Arithmetic

  25. 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. EE270 Special Lecture on FP Arithmetic

  26. EE270 Special Lecture on FP Arithmetic

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

  28. EE270 Special Lecture on FP Arithmetic

  29. EE270 Special Lecture on FP Arithmetic

  30. EE270 Special Lecture on FP Arithmetic

  31. s Sign Extension Trick (Favorite Interview Question) s s s s s s s s 1 s s s s s s 1 1 s s s s 1 1 s s 1 1 • Adding the 1’s does not change the value of significand • Sum of sign and 1 is negative of sign EE270 Special Lecture on FP Arithmetic

  32. Many Ways to Build A Tree EE270 Special Lecture on FP Arithmetic

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

  34. FP Addition Algorithm (The 3rd Time) EE270 Special Lecture on FP Arithmetic

  35. Advanced FP Addition Algorithm N. Quach & M. Flynn, SNAP Addition Algorithm, Stanford, 1991 EE270 Special Lecture on FP Arithmetic

  36. 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 EE270 Special Lecture on FP Arithmetic

  37. 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 EE270 Special Lecture on FP Arithmetic

More Related