This invention relates to arithmetic units particularly used for Digital Signal Processing.
In many advanced applications, Digital Signal Processing (DSP) is required, usually when analog and digital systems meet. Increasing the number of operands being used in each calculation increases the data computation rate. Thus, the standard 2-input Adder can add two operands while the 3-input Adder can add three operands, increasing the data computation rate by a factor of 50%.
One of the main tasks of DSP is the summation of multiplication operations:
ΣAi*Xi
In order to execute such tasks a Multiply and Accumulate (MAC) Unit is used, which also requires a multiplier and adder. The trend in DSP implementation is to increase the number of MAC Units in order to increase the data computation rate. The 3-input AU can be used in such cases and has several advantages.
In the case where the products of two multipliers should be summed, the 3-input arithmetic unit illustrated in
In other applications such as complex multiplication, the 3-input AU can increase data computation rates. Complex multiplication is very important and is used in many applications such as FFT (Fast Fourier Transform), which is very commonly used in many DSP applications. The multiplication of two complex numbers A and B is computed as follows:
Σ(Ar+i*Ai)*(Br+i*Bi)=Σ[(Ar*Br−Ai*Bi)+i*(Ar*Bi+Ai*Br)]
In order to implement such a task, the real and imaginary parts have to be calculated separately. In each calculation, two multipliers are needed as well as a single 3-input AU in order to accumulate the multipliers result, as shown in
As is known, when an adder is used to subtract a second operand from a first operand, this is done by adding to the first operand the twos complement of the second operand. This, in turn, is achieved by inverting each bit in the second operand and adding “1”, thus, in effect, requiring an additional adder, and increasing the computation time because each adder imposes its own computing overhead. The problem is further compounded when second and third operands are successively subtracted from a first operand, i.e. A−B−C. In this case, the two complements of both B and C must be derived by inverting each operand and adding two “1”s, thus requiring in total five adders, and even further increasing the computation overhead.
It would therefore be of particular benefit to provide a 3-input adder for inputting three operands A, B and C and being capable of computing A−B−C without requiring additional adder stages, since this would decrease the computing overhead and increase computation speed.
It would be of further benefit to configure such a 3-input adder to implement split operand arithmetic so as more efficiently to carry out complex arithmetic, as explained above.
It is therefore a principal object of the present invention to provide a 3-input adder for inputting three operands A, B and C and being capable of computing A−B−C without requiring additional adder stages
It is a further object of the invention configure such a 3-input adder to implement split operand arithmetic so as more efficiently to carry out complex arithmetic.
These objectives are realized in accordance with the invention by a 3-input adder/subtractor unit, comprising:
According to a further aspect of the invention there is provided a hardware-implemented method for computing a sum of three operands A, B and C, said method comprising:
The invention provides an improved AU architecture that supports four arithmetic operations between three user-defined operands. The four arithmetic operations are add, add-sub, sub-add and sub-sub.
Furthermore, the same architecture implements split instructions between two operands using the same hardware without overhead.
The 3-Input AU according to the invention allows DSPs to execute parallel instructions in one given machine cycle in Normal Mode or Split Mode.
The main features of the 3-input AU according to the invention can be summarized as follows:
The 3-input AU according to the invention has a simple control signal (OpCode) issued by the user. This signal is used to select the operand in an Add instruction and the inverted operand in a sub-instruction, the selected value being issued to the Add/Sub Unit.
The Add/Subtract Unit employs 3-to-2 Carry Save Adders (CSA) to compress the three input to two vectors (a Sum Vector and a Carry Vector). A conditional sum with a Carry Look Ahead mechanism is used to sum the two vectors.
In split mode, carry out from the low part is ignored by the high part, and the carry vector (shown as 16C in
The implementation described at the Logic Level can be fabricated in CMOS, Bipolar or other technologies.
The AU (Arithmetic Unit) performs the following operation according to the Op Code issued by the user.
In order to understand the invention and to see how it may be carried out in practice, a preferred embodiment will now be described, by way of non-limiting example only, with reference to the accompanying drawings, in which:
a and 1b are block diagrams showing functionally Summing Multipliers using Dual MAC Units with 2- and 3-input arithmetic units, respectively;
a and 4b are schematic representations showing implementations of a Full Adder used as a 3–2 Compressor in the Add/Subtract Unit of
a and 5b are schematic representations showing implementations of a Half Adder used in the Add/Subtract Unit of
The high and low components of the second operand B as well as their respective complements are fed to respective 2-to-1 multiplexers 29 and 30 each having a respective control input 31 and 32, which controls whether the output of the respective multiplexer 29 and 30 is the high and low component of B or the high and low component of {overscore (B)}. Likewise, high and low components of the third operand C as well as their respective complements are fed to respective 2-to-1 multiplexers 33 and 34 each having a respective control input 35 and 36, which controls whether the output of the respective multiplexer 33 and 34 is the high and low component of C or the high and low part of {overscore (C)}.
In order to achieve high speed, the controls to the respective multiplexers 29, 30, 33 and 34 are issued directly using an Op Code without a Decode stage. Table II below lists conversions from the Op Code to the controls:
Two carries are input to the Add/Sub Unit 24, designated Carry-in-low 40 and a Carry-in-high 41. In full width operation the Carry-in-low is used as carry in and the Carry-in-high is ignored. A Split Mode control 42 may also be fed to the Add/Sub Unit 24 whereby the Carry-in-low is used as carry in for the low component and Carry-in-high is used as carry in for the high component. This is explained in greater detail below with reference to
With this architecture, the Add/Sub Unit 24 can support a Split Mode option and implement the high speed 3-Input Adder.
The inputs issued to the Add/Sub unit 24 are:
The outputs from the Add/Sub Unit 24 are:
Add/Sub Unit
Also, as seen in
The first stage in the Add/Sub Unit 24 compresses the three inputs to two vectors: a Carry Vector and a Sum Vector. Standard Full Adder Cells are employed as shown in
S=a{circle around (x)}b{circle around (x)}c (1)
where a and b are the data inputs, c is the carry in, and the sign {circle around (×)} stands for Exclusive OR.
The carry out of the Full Adder is presented by equation (2):
Co=a·b+c·(a+b) (2)
where the sign · stands for logic AND and the sign + stands for logic OR.
The second stage is to sum the Carry Vector and the Sum Vector. The carry vector is shifted one bit left prior to inputting to the first 2-input adder 54. Thus, it is seen from
Out[n]=S[n+1]+C[n] (3)
The Add/Sub Unit 24 supports four combinations as described in Table I. Using twos-complement arithmetic the sum of the four combinations can be described by the equations (4), (5), (6) and (7).
Sum=A+B+C (4)
Sum=A−B+C=A+{overscore (B)}+1+C (5)
Sum=A+B−C=A+B+{overscore (C)}+1 (6)
Sum=A−B−C=A+{overscore (B)}+1+{overscore (C)}+1 (7)
All four forms of the combinations described by equations (4) to (7) can be summarized by equation (8):
Sum=A+b+α+c+β (8)
Where:
b=B or {overscore (B)}, c=C or {overscore (C)} and α and β can be 1 or 0 (zero extended to n bit).
To implement the addition contemplated by equation (8) with Carry Save Adders conventionally requires the use of 5-to-2 CSA compressors having the following inputs:
Since α and β are constant (1 or 0), α+β will also be constant and can be set to all the combinations as shown below in Table III:
Letting i be the MSB and j the LSB in (α+β), the summation with i and j is illustrated as follows with further reference to
i and j are fed to the Add/Sub Unit 24 from the Op Code fed to the arithmetic unit 20 as listed in Table II and shown in
The second row (LSB+1) A[1], B[1] and C[1] are compressed by the 3-to-2 compressor 51 and fed to the 2-input adder 54. The carry in to the 2-input adder 54 can be either i or the carry out of the Half Adder 57.
The principle of a conditional sum implemented in the high byte second 2-input adder 55 calculates the high byte of the sum under the assumption that the carry in (to the 2-input adder 55) is ‘1’ and produces at its output a provisional sum sumA. Likewise, the third 2-input adder 55 calculates the high byte of the sum under the assumption that the carry in (to the 2-input adder 56) is ‘0’ and produces at its output a provisional sum, sumB. A 2-to-1 Multiplexer 58 selects between the provisional sums sumA and sumB calculated by the 2-input adders 55 and 56 according to the control as well as the carry out high. Specifically, if the control is high sumA-carryA is selected as output; if the control is low sumB, carryB is selected.
The control to the Multiplexer 58 generates three signals:
In Full width Mode the control is equal to the carry out low issued from the low part, in Split Mode the control is equal to the carry in high input to the unit.
Basic Cells
Full Adder (3-to-2 Compressor):
a shows symbolically the Full Adder used as a 3-to-2 compressor in the Carry Save Adder, whose Truth Table is a shown below:
Half Adder
a shows symbolically the Half Adder, whose Truth Table is a shown below:
In order to understand the invention, some examples will now be described showing how the 3-Input AU 20 performs various arithmetic operations on three operands A=111, B=101 and C=011:
1. A+B+C
S[0]=1 (from Least Significant 3-to-2 Adder) passed to the H.A and since j=0, sum[0]=1 and Cout=0 (Carry out from Half Adder 57 is 0 since j=0). Cin=0 since both Cout and i are 0. This gives:
As explained above, the Adder 54 sums each of the two same-order bits so as to produce corresponding bits of the sum, displaced by one bit to the left. The zero order output is not generated by the Adder 54, but rather is equal to the Sum[0] output of the half adder 57. The sum is therefore represented as follows:
Sum[0]=S output of the half adder 57
Sum[1]=a0+b0
Sum[2]=a1+b1
Sum[3]=a2+b2
where:
As explained above, the Adder 54 sums each of the two same-order bits so as to produce corresponding bits of the sum, displaced by one bit to the left. The zero order output is not generated by the Adder 54, but rather is equal to the Sum[0] output of the half adder 57. The sum is therefore represented as follows:
Sum[0]=S output of the half adder 57
Sum[1]=a0+b0
Sum[2]=a1+b1
Sum[3]=a2+b2
where:
So the value of A−B+C is 0011, which is correct.
Number | Name | Date | Kind |
---|---|---|---|
4707800 | Montrone et al. | Nov 1987 | A |
5327369 | Ashkenazi | Jul 1994 | A |
5883824 | Lee et al. | Mar 1999 | A |
6003125 | Shippy | Dec 1999 | A |
6260055 | Sugeno et al. | Jul 2001 | B1 |
6292818 | Winters | Sep 2001 | B1 |
6449629 | Morgan | Sep 2002 | B1 |
6748411 | Hakami | Jun 2004 | B1 |
Number | Date | Country | |
---|---|---|---|
20040073585 A1 | Apr 2004 | US |