Combined floating point adder and subtractor
First Claim
1. Combined floating-point addition and subtraction circuitry for both adding and subtracting a first signed floating-point input number and a second signed floating-point input number, wherein each of said first and second signed floating-point input numbers has a respective sign, a respective mantissa and a respective exponent, to provide a sum and a difference of said first and second signed floating-point numbers, said combined floating-point addition and subtraction circuitry comprising:
- a first mantissa computation path including a first adder for adding said mantissas of said first and second signed floating-point numbers, a one-bit right-shifting circuit for controllably shifting output of said first adder to normalize said output of said first adder, and rounding circuitry for (a) providing a first candidate mantissa and (b) providing a first exponent-adjustment bit;
a second mantissa computation path including a first subtractor for subtracting said mantissa of said second signed floating-point number from said mantissa of said first signed floating-point number to provide a first mantissa difference, a second subtractor for subtracting said mantissa of said first signed floating-point number from said mantissa of said second signed floating-point number to provide a second mantissa difference, a selector for selecting as a mantissa difference output one of said first and second mantissa differences that is positive, and a normalize-and-round circuit for (a) providing a second candidate mantissa and (b) providing a second exponent-adjustment bit; and
a selection stage that selects, based on said respective signs, both (a) a mantissa of said sum of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas, and (b) a mantissa of said difference of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas.
1 Assignment
0 Petitions
Accused Products
Abstract
Circuitry (fixed or configured in a programmable device) for performing floating point addition and subtraction uses approximately the same resources as required for either operation separately. The circuitry is based on a recognition that when adding or subtracting two numbers, the two resulting mantissa values will be two out of three possibilities, and will involve either a one-bit shifting operation, or a shifting operation involving a large number of bits. Therefore, one mantissa path—a subtraction path—can be provided with full add/normalize/round circuitry, while a second mantissa path—an addition path—can be provided with a simple one-bit shifter and simplified rounding circuitry. Because the input numbers are signed, the “addition path,” which only adds the mantissas, may provide the mantissa for the subtraction result, depending on the signs of the input numbers. Similarly, the “subtraction path” may provide the mantissa for the addition result.
375 Citations
28 Claims
-
1. Combined floating-point addition and subtraction circuitry for both adding and subtracting a first signed floating-point input number and a second signed floating-point input number, wherein each of said first and second signed floating-point input numbers has a respective sign, a respective mantissa and a respective exponent, to provide a sum and a difference of said first and second signed floating-point numbers, said combined floating-point addition and subtraction circuitry comprising:
-
a first mantissa computation path including a first adder for adding said mantissas of said first and second signed floating-point numbers, a one-bit right-shifting circuit for controllably shifting output of said first adder to normalize said output of said first adder, and rounding circuitry for (a) providing a first candidate mantissa and (b) providing a first exponent-adjustment bit; a second mantissa computation path including a first subtractor for subtracting said mantissa of said second signed floating-point number from said mantissa of said first signed floating-point number to provide a first mantissa difference, a second subtractor for subtracting said mantissa of said first signed floating-point number from said mantissa of said second signed floating-point number to provide a second mantissa difference, a selector for selecting as a mantissa difference output one of said first and second mantissa differences that is positive, and a normalize-and-round circuit for (a) providing a second candidate mantissa and (b) providing a second exponent-adjustment bit; and a selection stage that selects, based on said respective signs, both (a) a mantissa of said sum of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas, and (b) a mantissa of said difference of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method of configuring a programmable integrated circuit device as combined floating-point addition and subtraction circuitry for both adding and subtracting a first signed floating-point input number and a second signed floating-point input number, wherein each of said first and second signed floating-point input numbers has a respective sign, a respective mantissa and a respective exponent, to provide a sum and a difference of said first and second signed floating-point numbers, said method comprising:
-
configuring logic of said programmable integrated circuit device as a first mantissa computation path including a first adder for adding said mantissas of said first and second signed floating-point numbers, a one-bit right-shifting circuit for controllably shifting output of said first adder to normalize said output of said first adder, and rounding circuitry for (a) providing a first candidate mantissa and (b) providing a first exponent-adjustment bit; configuring logic of said programmable integrated circuit device as a second mantissa computation path including a first subtractor for subtracting said mantissa of said second signed floating-point number from said mantissa of said first signed floating-point number to provide a first mantissa difference, a second subtractor for subtracting said mantissa of said first signed floating-point number from said mantissa of said second signed floating-point number to provide a second mantissa difference, a selector for selecting as a mantissa difference output one of said first and second mantissa differences that is positive, and a normalize-and-round circuit for (a) providing a second candidate mantissa and (b) providing a second exponent-adjustment bit; and configuring logic of said programmable integrated circuit device as a selection stage for selecting, based on said respective signs, both (a) a mantissa of said sum of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas, and (b) a mantissa of said difference of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A programmable integrated circuit device configured as combined floating-point addition and subtraction circuitry for both adding and subtracting a first signed floating-point input number and a second signed floating-point input number, wherein each of said first and second signed floating-point input numbers has a respective sign, a respective mantissa and a respective exponent, to provide a sum and a difference of said first and second signed floating-point numbers, said configured programmable integrated circuit device comprising:
-
logic configured as a first mantissa computation path including a first adder for adding said mantissas of said first and second signed floating-point numbers, a one-bit right-shifting circuit for controllably shifting output of said first adder to normalize said output of said first adder, and rounding circuitry for (a) providing a first candidate mantissa and (b) providing a first exponent-adjustment bit; logic configured as a second mantissa computation path including a first subtractor for subtracting said mantissa of said second signed floating-point number from said mantissa of said first signed floating-point number to provide a first mantissa difference, a second subtractor for subtracting said mantissa of said first signed floating-point number from said mantissa of said second signed floating-point number to provide a second mantissa difference, a selector for selecting as a mantissa difference output one of said first and second mantissa differences that is positive, and a normalize-and-round circuit for (a) providing a second candidate mantissa and (b) providing a second exponent-adjustment bit; and logic configured as a selection stage for selecting, based on said respective signs, both (a) a mantissa of said sum of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas, and (b) a mantissa of said difference of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24)
-
-
25. A non-transitory machine-readable data storage medium encoded with machine-executable instructions for configuring a programmable integrated circuit device as combined floating-point addition and subtraction circuitry for both adding and subtracting a first signed floating-point input number and a second signed floating-point input number, wherein each of said first and second signed floating-point input numbers has a respective sign, a respective mantissa and a respective exponent, to provide a sum and a difference of said first and second signed floating-point numbers, said instructions comprising:
-
instructions to configure logic of said programmable integrated circuit device as a first mantissa computation path including a first adder for adding said mantissas of said first and second signed floating-point numbers, a one-bit right-shifting circuit for controllably shifting output of said first adder to normalize said output of said first adder, and rounding circuitry for (a) providing a first candidate mantissa and (b) providing a first exponent-adjustment bit; instructions to configure logic of said programmable integrated circuit device as a second mantissa computation path including a first subtractor for subtracting said mantissa of said second signed floating-point number from said mantissa of said first signed floating-point number to provide a first mantissa difference, a second subtractor for subtracting said mantissa of said first signed floating-point number from said mantissa of said second signed floating-point number to provide a second mantissa difference, a selector for selecting as a mantissa difference output one of said first and second mantissa differences that is positive, and a normalize-and-round circuit for (a) providing a second candidate mantissa and (b) providing a second exponent-adjustment bit; and instructions to configure logic of said programmable integrated circuit device as a selection stage for selecting, based on said respective signs, both (a) a mantissa of said sum of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas, and (b) a mantissa of said difference of said first and second signed floating point numbers from among inputs including both of said first and second candidate mantissas. - View Dependent Claims (26, 27, 28)
-
Specification