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

Slides:



Advertisements
Similar presentations
Multipliers Multipliers Booth’s Multiplier Floating Point Arithmetic.
Advertisements

ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Arithmetic in Computers Chapter 4 Arithmetic in Computers2 Outline Data representation integers Unsigned integers Signed integers Floating-points.
©UCB CPSC 161 Lecture 6 Prof. L.N. Bhuyan
1 CONSTRUCTING AN ARITHMETIC LOGIC UNIT CHAPTER 4: PART II.
Binary Arithmetic Binary addition Binary subtraction
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
EE 382 Processor DesignWinter 98/99Michael Flynn 1 AT Arithmetic Most concern has gone into creating fast implementation of (especially) FP Arith. Under.
Chapter 3 Arithmetic for Computers. Multiplication More complicated than addition accomplished via shifting and addition More time and more area Let's.
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
1 Ó1998 Morgan Kaufmann Publishers Chapter 4 計算機算數.
Copyright 2008 Koren ECE666/Koren Part.6b.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
Assembly Language and Computer Architecture Using C++ and Java
1  2004 Morgan Kaufmann Publishers Chapter Three.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
1 Chapter 4: Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture Assembly Language and.
Chapter Four Arithmetic and Logic Unit
CSE 378 Floating-point1 How to represent real numbers In decimal scientific notation –sign –fraction –base (i.e., 10) to some power Most of the time, usual.
Copyright 2008 Koren ECE666/Koren Part.6a.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
COE 308: Computer Architecture (T041) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
CPSC 321 Computer Architecture ALU Design – Integer Addition, Multiplication & Division Copyright 2002 David H. Albonesi and the University of Rochester.
ECEN 248 Integer Multiplication, Number Format Adopted from Copyright 2002 David H. Albonesi and the University of Rochester.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
ECE 4110– Sequential Logic Design
Aug Shift Operations Source: David Harris. Aug Shifter Implementation Regular layout, can be compact, use transmission gates to avoid threshold.
Computer Arithmetic Nizamettin AYDIN
Computer Architecture Lecture 3: Logical circuits, computer arithmetics Piotr Bilski.
Computing Systems Basic arithmetic for computers.
ECE232: Hardware Organization and Design
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
1 EGRE 426 Fall 08 Chapter Three. 2 Arithmetic What's up ahead: –Implementing the Architecture 32 operation result a b ALU.
Computer Arithmetic II Instructor: Mozafar Bag-Mohammadi Spring 2006 University of Ilam.
1  1998 Morgan Kaufmann Publishers Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture.
Computer Arithmetic II Instructor: Mozafar Bag-Mohammadi Ilam University.
CSC 221 Computer Organization and Assembly Language
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Computer Arithmetic See Stallings Chapter 9 Sep 10, 2009
1 Ó1998 Morgan Kaufmann Publishers Chapter 4 計算機算數.
Floating Point Numbers Representation, Operations, and Accuracy CS223 Digital Design.
1 ELEN 033 Lecture 4 Chapter 4 of Text (COD2E) Chapters 3 and 4 of Goodman and Miller book.
Computer Architecture Lecture Notes Spring 2005 Dr. Michael P. Frank Competency Area 4: Computer Arithmetic.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Prof. Hsien-Hsin Sean Lee
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
1 CPTR 220 Computer Organization Computer Architecture Assembly Programming.
Computer System Design Lecture 3
CDA3101 Recitation Section 5
CS 232: Computer Architecture II
ECE/CS 552: Floating Point
CSCE 350 Computer Architecture
ECE/CS 552: Integer Multipliers
Arithmetic Logical Unit
Computer Arithmetic Multiplication, Floating Point
Computer Architecture
UNIVERSITY OF MASSACHUSETTS Dept
UNIVERSITY OF MASSACHUSETTS Dept
Chapter 4 計算機算數.
Presentation transcript:

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

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/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

3/23/2003EE270 Special Lecture on FP Arithmetic4

3/23/2003EE270 Special Lecture on FP Arithmetic5

3/23/2003EE270 Special Lecture on FP Arithmetic6

3/23/2003EE270 Special Lecture on FP Arithmetic7

3/23/2003EE270 Special Lecture on FP Arithmetic8

3/23/2003EE270 Special Lecture on FP Arithmetic9

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

3/23/2003EE270 Special Lecture on FP Arithmetic11

3/23/2003EE270 Special Lecture on FP Arithmetic12

3/23/2003EE270 Special Lecture on FP Arithmetic13

3/23/2003EE270 Special Lecture on FP Arithmetic14

3/23/2003EE270 Special Lecture on FP Arithmetic15

3/23/2003EE270 Special Lecture on FP Arithmetic16

3/23/2003EE270 Special Lecture on FP Arithmetic17

3/23/2003EE270 Special Lecture on FP Arithmetic18

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

3/23/2003EE270 Special Lecture on FP Arithmetic20

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

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

3/23/2003EE270 Special Lecture on FP Arithmetic23

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

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.

3/23/2003EE270 Special Lecture on FP Arithmetic26

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

3/23/2003EE270 Special Lecture on FP Arithmetic28

3/23/2003EE270 Special Lecture on FP Arithmetic29

3/23/2003EE270 Special Lecture on FP Arithmetic30

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

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

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.

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

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

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

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