Shared integer, floating point, polynomial, and vector multiplier
AssigneeApple Inc.
InventorJunji Sugisawa
Life of this patent
Estimating the term…
Abstract
A multiplier for performing multiple types of multiplication including integer, floating point, vector, and polynomial multiplication. The multiplier includes a modified booth encoder within the multiplier and unified circuitry to perform the various types of multiplication. A carry save adder tree is modified to route sum outputs to one part of the tree and to route carry outputs to another part of the tree. The carry save adder tree is also organized into multiple carry save adder trees to perform vector multiplication.
Claims24
A multiplier comprising:
- a plurality of encoders, wherein each encoder of the plurality of encoders is configured to:
- generate an encoder output value based on three bits from a multiplier operand when operating in a first mode;
- and
- generate the encoder output value based on two bits from the multiplier operand and force a third bit of the multiplier operand to zero when operating in a second mode, wherein the two bits and the third bit are three distinct bits;
- and
- an adder tree, wherein the adder tree comprises a plurality of carry save adders (CSAs) arranged into a plurality of levels, and wherein the adder tree is configured to:
- couple the encoder output values to inputs of a top level of CSAs;
- route carry terms to a first portion of CSAs and route sum terms to a second portion of CSAs;
- generate a first output from the first and second portions of CSAs when operating in the first mode;
- and
- generate a second output from the second portion of CSAs when operating in the second mode, wherein the second output is a polynomial product.
An execution unit comprising four multipliers, wherein each multiplier comprises an adder tree and a plurality of encoders, wherein each adder tree comprises three levels of carry save adders (CSAs), wherein a top level comprises three CSAs, wherein a middle level comprises two CSAs, wherein a bottom level comprises one CSA, and wherein each adder tree is configured to:
- couple output values from the plurality of encoders to inputs of the three CSAs on the top level;
- couple carry outputs from the three CSAs on the top level to inputs of a first CSA on the middle level;
- couple sum outputs from the three CSAs on the top level to inputs of a second CSA on the middle level;
- wherein each encoder of the plurality of encoders is configured to:
- generate an encoder output value based on three bits from a multiplier operand when operating in a first mode;
- and
- generate the encoder output value based on two bits from the multiplier operand and force a third bit of the multiplier operand to zero when operating in a second mode, wherein the two bits and the third bit are three distinct bits,
- wherein the second mode is a polynomial multiplication mode.
A method comprising:
- generating a sum term and a carry term in each CSA of three top-level CSAs of an adder tree;
- conveying the three carry terms to a first middle-level CSA of the adder tree;
- conveying the three sum terms to a second middle-level CSA of the adder tree;
- generating a sum term and a carry term in the first middle-level CSA;
- generating a sum term and a carry term in the second middle-level CSA, wherein the sum term is a polynomial product of a multiplicand operand and a multiplier operand;
- generating an encoder output value from each of a plurality of encoders based on three bits from a multiplier operand when operating in a first mode;
- generating the encoder output value from each of the plurality of encoders based on two bits from the multiplier operand and forcing a third bit of the multiplier operand to zero when operating in a second mode, wherein the two bits and the third bit are three distinct bits, and
- conveying the encoder output values to inputs of the three top-level CSAs of the adder tree,
- wherein the second mode is a polynomial multiplication mode.
A method comprising:
- generating a plurality of encoder output values, wherein each encoder output value of the plurality of encoder output values is generated based on three adjacent bits of a multiplier operand responsive to a first mode being selected, and wherein each encoder output value is generated based on two adjacent bits of the multiplier operand and a third bit of the multiplier operand is forced to zero responsive to a second mode being selected, wherein the two adjacent bits and the third bit are three distinct bits;
- generating a plurality of partial products from a multiplicand operand;
- for each encoder output value, selecting a partial product from the plurality of partial products based on a respective encoder output value;
- conveying the plurality of selected partial products to an adder tree;
- generating a plurality of sum outputs and a plurality of carry outputs on a top level of the adder tree;
- and
- adding the plurality of sum outputs separately from the plurality of carry outputs on successive levels of the adder tree,
- generating a first output from the adder tree responsive to operating in the first mode;
- and
- generating a second output from the adder responsive to operating in the second mode, wherein the second output is a polynomial product.
Dependencies are inferred from the claim text.