The present invention is related to the following U.S. Patent Application which is incorporated herein by reference:
Ser. No. 10/702,989 entitled “4-To-2 Carry Save Adder Using Limited Switching Dynamic Logic” filed Nov. 6, 2003.
The present invention relates to the field of carry save adders, and more particularly to a carry save adder that computes the carry-in bit to the higher order full adder in the current stage and not in the previous stage.
Carry save adders are often employed in high-speed multipliers, where they generally are able to function more rapidly than “carry propagate” or “ripple carry” adders. A carry save adder is distinguished from other types of adders by the fact that the “carry bits” and half-sum bits (hereinafter referred to simply as “sum bits” for convenience), which result from each addition, are not immediately combined or consolidated but instead are saved separately from each other for subsequent use in the next addition to be performed by the next cascaded carry save adder.
Because a carry save adder does not completely perform the relatively time-consuming process of combining carries with sum bits between successive additions in the multiplication process but instead defers this task until the final cycle of the multiplying operation, they are faster than ripple carry adders.
Typically, carry save adders have multiple inputs, e.g., three inputs, configured to receive multiple numbers, e.g., three numbers, to be added and have two outputs, designated as “sum” and “carry.” An example of such a carry save adder is illustrated in
Referring to
Referring to 1, full adder 102A of 4-to-2 carry save adder 101A may receive three inputs, designated as A, B and C. Full adder 102A may output a carry and a sum bit, designated as C′out and Sum′. The output, Sum′, may be input to the following full adder 102, full adder 102B, of 4-to-2 carry save adder 101A. Full adder 102B may also receive the inputs designated as D and C′in. The carry C′in may refer to the carry out bit, C′″out, generated by carry save adder 101B (lower order full adder 102C) in the previous stage or cell (next lower order bit). Full adder 102B may output a carry bit and a sum bit, designated as C″out and Sum″, respecively.
4-to-2 carry save adder 101B may be configured similarly as 4-to-2 carry save adder 101A. Full adder 102C may receive inputs A′, B′ and C′ and outputting outputs C′″out and Sum′″. The output, Sum′″, may be inputted to full adder 102D. Full adder 102D may also receive inputs D′ and C′″in where C′″in may refer to the carry out bit generated by the 4-to-2 carry save adder (lower order full adder) in the previous stage or cell (next lower order bit). Full adder 102D may output a carry bit and a sum bit, designated as C″″out and Sum″″.
As illustrated in
Therefore, there is a need in the art to decrease the delay of the carry-in bit inputted to the higher order carry save adder thereby decreasing the delay of outputting the sum and carry bits and improving the performance of carry save adders.
The problems outlined above may at least in part be solved in some embodiments by computing the carry-in bit to the high order full adder in the 4-to-2 carry save adder in the current stage than in the previous stage. By generating the carry-in bit in the current stage and not in the previous stage, the delay of the carry-in bit inputted to the higher order full adder is reduced. By reducing the delay of the carry-in bit inputted to the higher order full adder, the delay of outputting the sum and carry bits by the higher order full adder is reduced and hence the performance of carry save adders is improved.
In one embodiment of the present invention, a carry save adder comprises a first full adder and a second full adder coupled to the first full adder. The carry save adder may further comprise a logic unit coupled to the second full adder where the logic unit is configured to compute a carry from a carry save adder located in a previous cell.
The foregoing has outlined rather generally the features and technical advantages of one or more embodiments of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which may form the subject of the claims of the invention.
A better understanding of the present invention can be obtained when the following detailed description is considered in conjunction with the following drawings, in which:
The present invention comprises a 4-to-2 carry save adder configured to output sum and carry bits. In one embodiment of the present invention, the 4-to-2 carry save adder may comprise a lower order full order coupled to a higher order full adder. The carry save adder may further comprise a logic unit coupled to the higher order full adder where the logic unit is configured to generate a carry bit to be inputted to the higher order full adder that normally would be generated from the carry save adder located in the previous stage. By generating this carry bit (carry-in bit) in the current stage and not in the previous stage, the delay of the carry-in bit inputted to the higher order full adder is reduced. By reducing the delay of the carry-in bit being inputted to the higher order full adder, the delay of outputting the sum and carry bits by the higher order full adder is reduced and hence the performance of carry save adders is improved.
Although the present invention is described with reference to a 4-to-2 carry save adder used in an execution unit in a processor, it is noted that the principles of the present invention may be applied to any type of carry save adder used for addition whether or not the carry save adder is used in an execution unit. It is further noted that embodiments applying the principles of the present invention to such carry save adders would fall within the scope of the present invention.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without such specific details. In other instances, well-known circuits have been shown in block diagram form in order not to obscure the present invention in unnecessary detail. For the most part, details considering timing considerations and the like have been omitted inasmuch as such details are not necessary to obtain a complete understanding of the present invention and are within the skills of persons of ordinary skill in the relevant art.
FIG. 2—System
Referring to
FIG. 3—Processor
Referring to
Instructions may be retrieved from instruction cache 303 by instruction decode unit 304 to be decoded. Instruction decode unit 304 may comprise an instruction sequencer (not shown) configured to forward the decoded instructions to particular execution units, as described below, in an order determined by various algorithms. The decoded instructions may be forwarded to execution units: load/store unit 305, fixed point unit 306 and floating point unit 307. Each execution unit may execute one or more instructions of a particular class of instructions. For example, fixed point unit 306 may execute fixed point mathematical and logic operations on source operands, such as adding, subtracting, ANDing, ORing and XORing. Floating point unit 307 may execute floating point operations on source operands, such as floating point multiplication and division. Adding in the addition and multiplication processes may be accomplished in both fixed point unit 306 and floating point unit 307 using 4-to-2 carry save adders. These 4-to-2 carry save adders are discussed below in associated with
As stated in the Background Information section, as illustrated in
FIG. 4—Multiple Stage Carry Save Adder
Referring to
4-to-2 carry save adder 401A may comprise full adders 402A–B that each receive three inputs and output a carry and a sum bit. Similarly, 4-to-2 carry save adder 401B may comprise full adders 402C–D that each receive three inputs and output a carry and a sum. Full adders 402A–D may collectively or individually be referred to as full adders 402 or full adder 402, respectively. Full adders 402A, 402C may be referred to as the lower order full adder. Full adders 402B, 402D may be referred to as the higher order full adder.
4-to-2 carry save adders 401A, 401B may further comprise a carry logic unit 403A, 403B, respectively, configured to generate a carry-in bit which is equivalent to the carry-out bit generated from the next lower order bit position. For example, the carry-in bit, indicated as C′in, is equivalent to the carry-out bit generated from the next lower order bit position, indicated as C′″out in
Referring to
C′out=AB+AC+BC (EQ 1)
where the majority function outputs the value that at least two of the input signals possess. It is noted that the symbol “+”, as used herein, indicates the logical addition operation. It is further noted that it is implied that the logical multiplication operation is performed between inputs listed next to one another, e.g., AB is equivalent to A*B where * is the symbol, used herein, to indicate the logical multiplication operation. For example, if the inputs A and B had a logical value of 1 and the input C had a logical value of 0, then the majority function outputs the logical value of 1.
In one embodiment, lower order full adder 402A may output the sum bit, Sum′, by performing the sum function on the inputs A, B and C as illustrated in the following formula:
Sum′=A⊕B⊕C (EQ2)
where the sum function may perform the XOR function, as indicated by ⊕, on each of the inputs.
Cary logic unit 403A may output the carry-in bit, C′in, as discussed above, by performing the majority function on the inputs to the next lower order bit, as indicated by inputs A′, B′ and C′. That is, the inputs from the previous stage, as indicated by A′, B′ and C′, that are inputted to lower order full adder 402C of carry save adder 401B located in the previous stage, are also inputted to carry logic unit 403A. Carry logic unit 403A may then perform the majority function on inputs A′, B′ and C′ as illustrated in the following formula:
C′in=A′B′+A′C′+B′C′ (EQ3)
where the majority function outputs the value that at least two of the input signals possess. For example, if the inputs A′ and B′ had a logical value of 0 and the input C′ had a logical value of 1, then the majority function outputs the logical value of 0.
Referring to
C″out=(A′B′D+A′C′D+B′C′D)+((A′B′(A⊕B⊕C))+(A′C′(A⊕B⊕C)) +(B′C′(A⊕B⊕C))+((A⊕B⊕C)D) (EQ4)
where (EQ4) may be reduced to the following:
C″out=C′inD+C′inSum′+Sum′D (EQ5)
As stated above, the majority function outputs the value that at least two of the input signals possess. For example, if the inputs Sum′ and C′in had a logical value of 1 and the input D had a logical value of 0, then the majority function outputs the logical value of 1.
In one embodiment, higher order full adder 402B of 4-to-2 carry save adder 401A may output the sum bit, designated as Sum″, by performing the sum function on the inputs Sum′, C′in and D as illustrated in the following formula:
Sum″=Sum′⊕C′in⊕D (EQ6)
where the sum function may perform the XOR function, as indicated by ⊕, on each of the inputs.
Thus, by having carry logic unit 403A generate the carry-in bit, C′in, in the current stage and not in the previous stage, the delay of the carry-in bit inputted to the higher order full adder 402B is reduced. By reducing the delay of the carry-in bit inputted to the higher order fall order 402B, the delay of outputting the sum and carry bits by full adder 402B, Sum″ and C″n, respectively, is reduced and hence the performance of carry save adders is improved.
4-to-2 carry save adder 401B is similarly configured as 4-to-2 carry save adder 401A. Full adders 402C, 402D are similarly configured as full adders 402A, 402B, respectively. Full adder 402C may receive inputs A′, B′ and C′ and output a carry bit, designated as C′″out, using EQ1 as well as output a sum bit, designated as Sum′″, using EQ2. Carry logic unit 403B is similarly configured as carry logic unit 403A. Carry logic unit 403B may receive inputs A″, B″ and C″ which are the same inputs that are inputted to the lower order full adder of the 4-to-2 carry save adder located in the previous stage (not shown). Carry logic unit 403A may then perform the majority function on inputs A″, B″ and C″ to output a carry bit, designated as C″in, using EQ3. Full adder 402D may receive inputs Sum′″, C″in and D″ where input D″ is inputted to 4-to-2 carry save adder 401B. Full adder 402D may output a carry bit, designated as C″″out, using EQ5 as well as output a sum bit, designated as Sum″″, using EQ6.
Although the system and carry save adder are described in connection with several embodiments, it is not intended to be limited to the specific forms set forth herein, but on the contrary, it is intended to cover such alternatives, modifications and equivalents, as can be reasonably included within the spirit and scope of the invention as defined by the appended claims. It is noted that the headings are used only for organizational purposes and not meant to limit the scope of the description or claims.
Number | Name | Date | Kind |
---|---|---|---|
4556948 | Mercy | Dec 1985 | A |
5303176 | Hrusecky et al. | Apr 1994 | A |
5805491 | Bechade | Sep 1998 | A |
5818747 | Wong | Oct 1998 | A |
6415311 | Purcell et al. | Jul 2002 | B1 |
6466960 | Winters | Oct 2002 | B1 |
6567835 | Blomgren et al. | May 2003 | B1 |
20030014459 | Fletcher | Jan 2003 | A1 |
Number | Date | Country | |
---|---|---|---|
20050102346 A1 | May 2005 | US |