Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 A Combined Decimal and Binary Floating-point Multiplier Charles Tsen, Sonia González-Navarro, Michael Schulte, Brian Hickmann, Katherine Compton 2009.

Similar presentations


Presentation on theme: "1 A Combined Decimal and Binary Floating-point Multiplier Charles Tsen, Sonia González-Navarro, Michael Schulte, Brian Hickmann, Katherine Compton 2009."— Presentation transcript:

1 1 A Combined Decimal and Binary Floating-point Multiplier Charles Tsen, Sonia González-Navarro, Michael Schulte, Brian Hickmann, Katherine Compton 2009 20th IEEE International Conference on Application- specific Systems, Architectures and Processors

2 2 Presented by: Mehrnoosh Janbakhsh Feb 2010

3 3 In this presentation, we describe the first hardware design of a combined binary and decimal floating-point multiplier, based on specifications in the IEEE 754-2008 Floating-point Standard. The multiplier design operates on either 64-bit binary encoded decimal floating-point (DFP) numbers or 64-bit binary floating-point (BFP) numbers.

4 4 IEEE 754-2008 defines two encodings for DFP numbers: The decimal encoding of DFP numbers (the significand is encoded) which is named Densely-Packed Decimal (DPD). The binary encoding of DFP numbers and is commonly referred to as Binary Integer Decimal (BID) because the significand is encoded as an unsigned binary integer.

5 5 The designed multiplier uses the BID encoding for DFP multiplication, also shares the hardware for BFP and BID multiplication.

6 6 Outline i. Describes the BFP and BID data types ii. Reviews the BFP iii. BID multiplication algorithms iv. Introduces the combined BFP and BID algorithm v. The synthesis results vi. Future research

7 7 DFP AND BFP DATATYPES - Representation The BFP and DFP number formats use three fields to define a number: a sign, an exponent, and a significand. The value of a normalized BFP number is: (-1) power S.C.2 power E-bias S: sign C: significand E: the biased exponent Bias: positive const.

8 8 In DFP S is the sign and the exponent E is biased by a value bias to allow negative exponents but Unlike BFP, the significand C is an unsigned integer with p decimal digits of precision, and this significand is not normalized— It can be any value in the range [0,10 power p -1]

9 9 Example To clarify the floating-point formats, consider an example of how to represent the value 0.125 in both BFP and BID systems. In 64-bit BFP, it is represented as (-1) power 0. (1.00000…0). 2 power ( 1020- 1023), where there are 52 binary zeros after the radix point of the significand. With the 64-bit BID encoding, 0.125 is represented as (-1) power 0.125. 10 power (395-398). In this case, the significand is represented as a binary integer 0…01111101, where there are 47 zeros before the leftmost 1.

10 10 - Rounding Modes The rounding mode, combined with the sign, whether the closest number is odd or even, and the location of the infinitely precise result on the number line determine the direction of rounding. IEEE 754-2008 specifies five rounding modes for floating-point numbers: RTE, RTA, RTZ, RTN,RTP. The RTA rounding mode is required only for DFP, but the other four rounding modes apply to both BFP and DFP.

11 11 - Special Values and Exceptions Invalid, divide by zero, underflow, overflow, and inexact are exceptions. The special values are infinity (INF), signaling Not-a-Number (sNaN), and quiet Not-A-Number (qNaN). The difference between sNaN and qNaN is that the sNaN will cause the invalid exception flag to be raised when it is an operand to any operation.

12 12 FLOATING-POINT MULTIPLICATION ALGORITHMS Step1: Decode inputs A and B to obtain (sign A, E A, C A ) and (sign B, E B, C B ). Also detect special input operands, such as NaN, Zero, and INF. Step2: Compute intermediate product: C IP = C A. C B with a binary multiplier. In parallel, compute intermediate exponent, E IP = E A + E B - bias and final sign, sign Z = sign A XOR sign B Step3: Examine C IP to determine if rounding is needed. Rounding is needed if C IP exceeds p bits or digits. Step4: Create C Z via a conditional increment of C TP based on r* and s*. If rounding causes a carry out, set C Z to 1,000,000,000,000,000 10 and adjust the final exponent, E Z. Step5: Encode the output, based on (sign Z, E Z, C Z ).

13 13 COMBINED MULTIPLIER DESIGN - Operand Decoder and Encoder The exponent and significand widths differ by only one bit between BID and BFP. Thus, each input is decoded into 70-bits: 1 bit for the sign, 11 bits for the exponent, 54 bits for significand, and 4 bits to indicate a special value using a one-hot encoding.

14 14 Block diagram of combined multiplier

15 15 Shared hardwareUnshared hardware -Significand decoding -Sign decoding -Special case detection -Exponent decoding -BFP subnormal detection -BID non-canonical zero detection SHARED HARDWARE IN OPERAND DECODER BLOCK

16 16 COMBINED MULTIPLIER DESIGN - Multiply Datapath

17 17 DATAPATH BLOCK DESCRIPTION This block multiplies the significands,C A and C B, to obtain an intermediate product, C IP, which has up to 107 significant bits. C IP.w d, to truncate d decimal digits as the first step in rounding BID numbers. The 107 times108-bit multiplication uses four 54 times 54-bit multiplies The fully shaded portions represent hardware that is completely shared between the BID and BFP datapaths. The unshaded areas are dedicated to only one of the datatypes, and the partially shaded areas contain some shared circuitry and some dedicated circuitry.

18 18 To determine if a BID value must be rounded, it is compared to 10 power16. To avoid a long carry chain, the multiplier individually examines the lower and upper 54-bits of PS and PC, since if any bit is set in the upper 54-bits,rounding is needed. If the sum of the lower bits of PS and PC are greater than 10 power 16 or if the OR'd bit is set, then rounding is needed for BID. For normalized BFP multiplication, since it is known that CIP is in the range [1.0, 4.0), normalization consists of a conditional right shift by one bit and an OR tree to determine s*. The design sets a bit called ultimate if CTP is all 1s, indicating that incrementing it will cause a carryout.

19 19 SHARED HARDWARE IN MULTIPLY DATAPATH BLOCK Shared hardwareUnshared hardware -54x54-bit multiplier -Right shifter -Sticky calculation -Exponent calculation (bias difference requires extra logic) -Detect if BID rounding needed -Multiply feedback path for BID rounding -BID rounding lookup tables -BID digits counting -Detect all-1 significand for BFP -Detect all-9 significand for BID

20 20 COMBINED MULTIPLIER DESIGN - Rounding Logic Based on s* and r* on Floating-point rounding techniques for both BID and BFP the sign of the result, and the rounding mode, the final result is determined by conditionally incrementing the upper bits of C IP. SHARED HARDWARE IN ROUNDING LOGIC Shared hardwareUnshared hardware -Incrementer -Increment decision logic -Overflow detection -Underflow detection

21 21 COMBINED MULTIPLIER DESIGN - Control If a BID multiply enters the unit while it is idle, the operation begins immediately. Subsequent multiplies wait until the current BID multiply finishes, which takes five or fifteen cycles, depending on if rounding is needed. If a BFP multiply enters the unit while it is idle, are fully pipelined. Since BFP multiplies always take five cycles in this design, the control can keep track of how many cycles before the pipeline is empty. It is chosen to make the multiplier have variable latency for BID multiplication (five to fifteen cycles) to exploit a common case.

22 22 Future work May provide more sophisticated communication with a scheduler to enable more than one BID multiply operation in flight. The design could be enhanced to allow BID and BFP operations to be interleaved.

23 23 Results The combined BFP and BID multiplier are modeled in RTL-level Verilog For baseline comparisons, the hardware for the standalone BID multiplier and BFP multiplier are modeled All three designs were simulated with hundreds of directed test cases and millions of random test cases using Mentor Graphics Modelsim. The synthesis are performed based on Synopsys Design Compiler and TSMC’s tcbn65gplus 65nm CMOS standard cell library.

24 24 SYNTHESIS RESULTS DesignArea (um2) Delay (ns) Delay (FO4) Standalone BFP439470.5819 Standalone BID584820.7926 Total Area of Standalone Multipliers 102429 ----------- Combined BID and BFP591000.8126

25 25 ……Results The area of a combined BID and BFP multiplier occupies 58% of the total area of separate BFP and BID units. The delay of the combined multiplier is slightly longer than the standalone DFP multiplier and 37.8% longer than the standalone BFP unit.

26 26 CONCLUSIONS AND FUTURE WORK The goal of this research was to investigate hardware sharing opportunities for IEEE 754- 2008 floating-point multiplication. The work shows that the sharing potential between BFP and BID may be beneficial to chip designers wishing to conserve area. Future work to improve the algorithms and designs for hardware sharing may lend further insights into sharing possibilities.

27 27 Any Questions?


Download ppt "1 A Combined Decimal and Binary Floating-point Multiplier Charles Tsen, Sonia González-Navarro, Michael Schulte, Brian Hickmann, Katherine Compton 2009."

Similar presentations


Ads by Google