Radix 4 carry lookahead trees

Abstract: A high radix carry lookahead tree includes a plurality of tree nodes, each of the tree nodes including a carry chain or a variation thereof, and/or a NAND gate chain or a variation thereof; and each tree node may have three or more children.

Description: This invention relates to an improved carry lookahead technique, used, for example, in an adder. Related inventions are described in our copending applications, published as EP450752, EP450751 and EP450754, filed concurrently herewith. In binary place value addition two operands, represented in the binary place value code, are summed to produce a result, also in binary place value code. Each operand, and the result, is an array of bits. In the binary value code, the position of a bit in the array determines its power of two weight; hence, value = sum (bit x 2^pos). The bit with the least weight in determining the value of a representation is called the least significant bit, or LSB. Similarly, the bit with the greatest weight is called the most significant bit, or MSB. Other number systems have better properties for addition, but they suffer from other problems, so virtually every computer on the market today uses the binary place value code. In the addition method done by hand, the sum is formed for the LSB position, a carry is possibly propagated to the next bit position, and the process is repeated for successive bit positions until each bit in the result has been calculated. This method is know as 'ripple carry' addition to those skilled in the art, as shown in FIG. 1. Ripple carry addition is inherently slow because of its serial nature. Traditionally, addition has been speeded up by using one of the following techniques, as described in CMOS VLSI Design, Addison-Wesley 1985: Carry look-ahead, Manchester Carry Lookahead, Binary Carry Lookahead trees, and Carry Select Addition. Another Technique, as described in the 5th Annual symposium on Theoretical Aspects of Computer Science, STACS 1988, is Condition Sum Addition. Still another technique is the Multiple Output Domino Logic adder described in the 1988 Solid-State Circuits Conference Digest of Technical Papers. Each of these adders, except the Carry Select, and the Conditional Sum Adder, is based on the concepts of carry propagation, carry generation, and carry kill (see FIG. 2); which are well understood by people skilled in the art. A carry is said to 'propagate' through a bit position if a carry into the summation operation for a given bit position is followed by a carry out of the given bit position, while the summation for the given bit position does not produce a carry out when no carry is input. A carry is said to be 'generated' from a given bit position if the summation for the given position produces a carry out independent of a carry in. A carry is said to be 'killed' in a hit position if a carry does not propagate through the bit. As known by people skilled in the art, and shown in FIG. 2, the propagate and generate signals may be found without actually doing the summation. A grouping of adjacent sum functions, adjacent propagate functions, or adjacent generate functions, may be called a 'block', an example of which is shown in FIG. 1. The terms propagate, generate, and kill, may be applied to blocks. A carry is said to propagate through a given block if a carry into the given block's LSB summation is followed by a carry out of the given block's MSB summation. A block is said to generate a carry if the said block's MSB summation produces a carry out, independent of carries into the block's LSB. It is known by anyone skilled in the art that a block can only generate if a given bit position in the block generates and all bits between the given bit and the block's MSB propagate, as done in the Manchester Carry Chain described in CMOS VLSI, Addison Wesley, 1985. An overview of carry look-ahead adder theory is given in Digital Computer Arithmetic, by J.J.F. Cavanagh, p. 107-117, McGraw-Hill (1984). The CLA speeds computation of the carries by using redundant logic. A block is defined for a given bit position such that the LSB of the block corresponds to the LSB of the add, and the MSB of the block corresponds to the given bit position. Hence, there are as many blocks as there are bit positions in the result minus 1, as shown in FIG. 3. An additional block is needed if a carry out is required. Each block has only the input operands and the carry into the add as inputs, and one carry as an output. Theoretically, any single logic function may be performed in two gate delays, so the time to produce a sum in a carry lookahead adder is theoretically a constant four gate delays; however, the finite gain of real gates limits the amount of load that any one gate can drive in a given amount of time, so more gate delays must be added. Also, since the input operands themselves are driven by gates, the number of carry blocks that can be driven, and hence the number of bits the result may have, is also limited. The carry lookahead adder becomes relatively slow for results sizes beyond a few bits. The performance of the carry lookahead adders shows that loading considerations of real gates determines add time, not the theoretical number of gate delays. A recent adder invented by Ling, presented in the IBM Journal of Research and Development, May 1981, reduces the load from the output of the propage and generate state by one gate input per bit, per block. Although this method alleviates the loading problem, the CLA adder remains relatively inefficient for adds of more than a several bits. The Manchester Carry Lookahead adder, FIG. 4, speeds addition by allowing carries to skip blocks that propagate. To apply this method, an add is broken into a series of blocks, such that no carry propagation logic is duplicated. Then, all of the bit propagates for a given block are ANDed together to determine if the given block will propagate. If the block will propagate, then a bypass is turned on which will route any carries into the LSB of the block directly to the output of the block's MSB. This method works well for certain size adders in CMOS; however, its performance is still linearly related to the size of the add. In attempts to alleviate this problem multiple levels of skip are added, as explained in the IEEE Transactions on Computers Volume 36. For adds greater than 32 bits, this method can only approach the speed of a Binary Lookahead Carry adder, and it will be significantly slower than the adder being presented in this application because of theoretical and practical reasons. A binary tree is a special graph composed of nodes and arcs, similar to a family tree. The one node at the top has no predecessors, it is called the 'root' node. Each node in the tree has one or two 'children', except for the 'leaf' nodes which have no children (corresponds to the youngest generation). Circuits with special properties may be built with gates as nodes. In 1980 it was shown that an 'o' operator could be defined which would allow carries in an adder to be implemented in a binary tree [CMOS VLSI design]. However, the binary carry lookahead tree could only provide carries for bit positions of powers of 2 (i.e., 2, 4, 8...), so an 'inverse' tree had to be employed to derive the inbetween carries, which causes more overhead. The Binary Lookahead Carry tree, FIG. 5 has gate delays related to the log base 2 of the add length, plus overhead. As in the case with the carry lookahead adder, circuit loading prevents the realization of the log base 2 gate delays for large trees, i.e., trees for adds bigger then about 8 bits. Also, as is known to anyone skilled in the art, the tree becomes large and inefficient to layout for large adds. The MODL gate adder, described in the 1988 IEEE Solid-State Circuits Conference Digest of Technical Papers, is an attempt to alleviate some of these problems and allows for a log base 2 x linear performance (less than log base 2) for larger adds. A Carry select adder, shown in FIG. 6, is based on the principle of partitioning the add into three blocks. The first block adds the bottom half of two operands. The second block adds the top half of the operands while assuming a carry in from the first block of zero. The third block adds the top half of the operands while assuming a carry in from the first block of one. When the carry from the first block is calculated it is used to pick the correct top half of the result by selecting the sum out of block two, or the sum out of block three via a two to one mux. When carry select adders are strung out in series they have linear performance related to the number of sections, plus the add time of the first section. For large adds, this type of adder is relatively slow, but it is small. The Conditional Sum Adder is a recursively applied Carry Select Adder. An add is broken into many redundant blocks of two, then one set is picked so that only half as many possible sums remain. The process of halving the possible sums is continued in multiple stages until only the result remains. This adder has a log base 2 performance; however, it is even larger than the BLC adder. Since the summation is calculated along with the carries in each stage, the summation logic is unnecessarily reproduced many times. Also, the summation overhead makes this adder slower than the BLC adder. Because adders form the heart of many digital circuits, and they are a major contributor to the required cycle time of RISC microprocessors, there has continued to be a need for faster adders. A carry-lookahead adder based on traditional block carry-lookahead techniques is described in "Proceedings, 7th Symposium on Computer Arithmetic, 4-6 June '85, Illinois p. 9-15". A binary adder which uses a unique configuration of the lookahead carry levels to reduce the number of logic levels required for the carry function is described in IBM Technical Disclosure, Vol. 7, No. 11 April 1965 "Binary Adder with Quaternary Lookahead" R.M. Wade. Proceedings of the IEEE 1988 Custom Integrated Circuit Conference May 1988, Pages 1751 to 1756 reports a high speed and dynamically re-configurable 32-bit CMOS adder. The adder employs a 32-bit carry lookahead circuit based on multiple output domino logic (MODL). MODL 4/8-bit group generate and propagate blocks provide signals to a group carry block which contains a 3-bit multiple carry generator. US Patent Number 4,905,180 describes a partitioned carry lookahead adder fabricated from a plurality of 4-bit slice blocks. The blocks are organised to generate group propagate signals and each block has a block carry line with a single transistor connected between the input and output terminals of the block: there is also a main carry line with transistors controlled by the group propagate signal. The general configuration is similar to that of the Manchester Carry Lookahead adder shown in Figure 4. According to the present invention there is provided a carry lookahead tree-type logic circuit comprising: a carry lookahead tree-type logic circuit for use in a two-operand adder comprising: a plurality of tree nodes consisting of subcircuits; each of the subcircuits having eight input terminals, two output terminals, and an internal logic circuit including a carry chain portion; the subcircuits being connected to form a three level tree with fourteen first level subcircuits and four second level subcircuits; each of the first level subcircuits being operable to produce block propagate and generate terms for four bit-generate and four bit-propagate input positions of the operands on its input terminals; three of the second level subcircuits being connected to receive the block propagate and generate terms produced by four first level subcircuits and to produce block propagate and generate terms therefrom; and wherein the fourth of the second level subcircuits is connected to receive the block propagate and generate terms produced by two first level subcircuits and in that two of the said subcircuits are on the third level of the tree, one of the third level subcircuits being connected to receive the block propagate and generate terms produced by the four second level subcircuits and to produce block propagate and generate terms therefrom; the other third level subcircuit being connected to receive block propagate and generate terms from two of the second level subcircuits and to further make those signals available as an output for obtaining carry signals therefrom; and whereby the said other third level subcircuit provides information as to intermediate carries on 8-bit boundaries of the tree. In a preferred embodiment the tree is a radix 4 carry lookahead tree, and the internal logic circuit in each subcircuit further comprises a NAND gate portion consisting of a chain of gates coupled for performing a logical NAND on propagate inputs along the chain of gates. Accordingly, there is described a relatively small circuit for performing a relatively large add within a short period of time. The circuit can be easily and practically scaled, and loses little speed when so sealed. In the accompanying drawings, by way of example only: Figs. 1-6 depict various prior art configurations; Fig. 7 is a block diagram of a computer system including a processor, within which a lookahead tree embodying the invention may be incorporated. Fig. 8 is a block diagram of the processor shown in Fig. 7; Fig. 9 is a more detailed block diagram of the processor of Fig. 8; Fig. 10 is a block diagram of a floating point unit; Fig. 11A is a schematic diagram of a radix-four carry lookahead tree; Fig. 11B is a schematic diagram of a radix-four carry lookahead tree embodying the present invention, the tree being based on the tree of Fig. 11A but including a redundant cell; Fig. 12 is a schematic diagram of a modified carry chain for use in the tree of Fig. 11B; Fig. 13 is a schematic diagram of a modified for carry in cell for carry in for use in the tree of Fig. 11B; and Fig. 14 is a schematic diagram of a Manchester Carry Chain block for use in the tree of Fig. 11B. Referring now to Fig. 7, a simplified system diagram of a computing system including a processor 2 is shown therein. The purpose of this diagram, as well as several subsequent diagrams, is to illustrate an environment in which a carry lookahead tree embodying the present invention may be usefully incorporated. Processor 2 accesses external instructions and data using three non-multiplexed buses. These buses may be referred to collectively as a channel. The channel comprises a 32-bit bus 4 for instruction transfers, a second 32-bit bus 5 for data transfers, and a third address bus 8 which is shared between instruction and data accesses. The address bus 8 is pipelined, so that it can be released before an instruction or data transfer is completed. This allows a subsequent access to begin before the first has completed, and allows the processor 2 to have two accesses in progress simultaneously. The overall system shown in FIG. 7 may also be seen to comprise an instruction ROM 10 and instruction memory 12, both operatively connected between the address bus 8 and instruction bus 4. Additionally, a data memory 14 and data transfer controller 16 are shown to be operatively connected between the address bus 8 and data bus 6. Further, the data transfer controller 16 is also operatively connected so as to send signals onto, and receive signals from, a system bus 18. Referring now to FIG. 8, a data flow diagram of the processor 2 is shown therein so that a better understanding of that processor 2 may be obtained. Processor 2 implements a four-stage pipeline for instruction execution, the four stages being "fetch", "decode", "execute" and "write-back". The instruction fetch unit 20 of processor 2 fetches instructions, and supplies instructions to other functional units. The unit 20 incorporates an instruction prefetch buffer, a branch target cache, and a program counter unit. These subunits will be discussed further below with reference to FIG. 9. All components of the instruction fetch unit 20 operate during the fetch stage of the processor pipeline. Processor 2 also includes an execution unit 22. The execution unit 22 includes a register file, an address unit, an arithimetic/logic unit, a field shift unit, a prioritizer, and a floating point processing unit. These subunits, like the subunits of the instruction fetch unit 20, are also discussed further below with reference to FIG. 9. The register file and address unit operate during the decode stage of the pipeline. The arithmetic/logic unit, field shift unit, and prioritizer operate during the execute stage of the pipeline. The register file also operates during the write-back stage. Still further with reference to FIG. 8, the processor 2 may be seen to include a memory management unit 24. The memory management unit 24 performs address translation and memory-protection functions for all branches, loads and stores. The unit 24 operates during the execute stage of the pipeline, so the physical address that it generates is available at the beginning of the write-back stage. Interconnection of the units 20, 22 and 24 in processor 2, as well as their interfaces with system buses, are also shown in FIG. 8. Referring now to FIG. 9, even further details regarding the subcomponents of the processor 2 are shown diagrammatically. As previously mentioned, the instruction fetch unit 20 may be seen to comprise an instruction prefetch buffer 26, a branch target cache 28, and a program counter unit 30. As also previously mentioned, the memory management unit 24 may be seen to comprise means 32 for performing address translation and memory protection functions for all branches, loads and stores. Finally, the execution unit 22 may be seen to comprise a register file 34, an address unit 36, an arithmetic/logic unit 38, a field shift unit (also designated by reference numeral 38), a prioritizer (also designated by reference numberal 38), and a floating point processing unit 40. Although various other elements (e. g., special purpose registers 42) and interconnection details are shown in FIG. 9, because they are only peripherally related to the present invention, and because the diagram alone is sufficiently communicative to those skilled in the art to understand processor 2 well, further details regarding all units other than the floating point unit 40 and other elements to which it is operatively connected are not set forth herein. Several noteworthy aspects of the floating point unit 40 may be seen with reference to FIG. 9. Recognising that the floating point unit 40 manipulates A and B operands, those A and B operands come from the register file 34 via A and B buses 44, 46, respectively. Results of manipulations, e. g., calculations, by the floating point unit 40 are written into the register file via result bus 48. Also, instructions for operation of the floating point unit 40 are transmitted thereto via processor instruction bus 50. Referring now to FIG. 10, various subcomponents of a pipelined floating point processing unit constructed in accordance with the teachings of the present invention may now be seen. The various interface points discussed above with reference to FIG. 9 are similarly shown and labelled in this FIG., i.e., operands from the register file are fed into the floating point unit via A and B buses 44, 46, results leave the floating point unit via the result bus 48, and instructions are transmitted to the floating point unit via the instruction or I-bus 50. With special reference to FIG. 10, the A bus, B bus and result bus may be seen to be operatively connected to an interface unit 52 within the floating point unit, whereas the I-bus is operatively connected to a controller 54 therein. It is well-known that when numbers for processing, i.e., A and B operands, are input to a floating point unit such as floating point unit 40, the floating point unit performs the desired (or instructed) arithmetic operations, and outputs the result on a result bus such as bus 48. Floating point units such as floating point unit 40 may process both floating point and integer numbers. Various floating point formats may be supported, such as 32 bit (single-precision) and 64 bit (double precision). Additionally, the floating point unit 40 may handle conversion of integers to floating point, and the reverse. Each of the above aspects of floating point unit 40 is discussed further in the related cases referred to above and incorporated herein by reference. Referring still further to FIG. 10, those skilled in the art should appreciate the function and operation of most of the various floating point unit subcomponents shown therein. Those subcomponents which operate in a generally conventional individual manner, and are thus not discussed in detail herein, include predetector 56, denormalizer 58, multifunction unit 60, renormalizer 62, multiplier 64, partial product summer 66, divider 68, rounder 70, and accumulator(s) 72. Some very important aspects of these subcomponents and the interaction thereof exist however, and are discussed at length in the related cases, to which the reader is urged to refer. Referring now to FIG. 11A, a schematic diagram of a radix-four lookahead tree according to the teachings of the present invention is shown therein. This radix-four lookahead tree should be understood to be incorporateable into an adder as disclosed in related application number 91301348.8 further identified above, and then further incorporated into such elements as divider 68, multiplier 64 and multifunction unit 60 of the floating point unit shown in FIG. 10. Needless to say, this radix-four lookahead tree, as well as the adder referred to above, could also be used in many other places. The tree shown in FIG. 11A may be seen to comprise three different types of blocks. These three different types of blocks are a modified carry chain block, a modified for carry in carry chain block, and a Manchester Carry Chain block. Each of these three different types of blocks are discussed further below. Referring still further to FIG. 11A, and also to FIG. 11B, these three different types of blocks may be seen to be arranged in three levels. The first level comprises fifteen modified carry chain blocks 74-102 and a sixteenth block which is a modified for carry in carry chain block 104. The second level comprises four Manchester Carry Chain nodes 106-112, and the third level (specifically in FIG. 11B) comprises two Manchester Carry Chain nodes 114, 116 (one of which, designated by reference numeral 116, is effectively a "redundant cell", discussed further below) (it should be noted that the redundant cell is not shown in FIG. 11A). Referring now to FIGs. 12, 13 and 14, a Manchester Carry Chain, block 110, may be seen to receive propagate and generate signals from four child nodes, or from the propagate generate inputs, and produce the block generate and block propagate signals. A modified carry chain, block 74, may be seen to do a similar function with fewer transistors. The modified carry chain, block 104, may be seen to perform a similar function while taking into account a carry in Referring now back to FIG. 11A, each of the nodes shown on level one: 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, and 104 produce block propagate and generates for four input positions. Each of the nodes on level two: 106, 108, 110, and 112; produce block propagates and generates from four of the level one blocks. Hence, level two provides information about 4x4, or 16 bit blocks. Block 114, on level three, provides block information about four of the blocks on level two, or 4x(4x4), or 64 bits. Those skilled in the art should be impressed that this circuit obtains carries in log base 4 delays, without much internal loading. Those skilled in the art should appreciate that the circuit shown in FIG. 11B is based upon a radix-four lookahead tree. The basic radix-four carry lookahead tree shown in FIG. 11B gives carries at bits 0(Cin) 4, 8, 16, 32, 48 and 56. Carry 8 is available through traditional means, from block 112. Carries 24, 32, and 40 may be obtained by adding a redundant cell as discussed further below. Carries 32, 48 and 56 may be obtained from block 114. Each of the carry output points is clearly indicated in FIG. 11B. Of course, certain carries can be extracted from the tree at more than one place, e. g., CLA 32 may be extracted from both points 118 and 120. Carries on all 8 bit boundaries are available, making this an ideal carry prediction block for, but not limited to, the High Speed Mixed Radix Adder, Lynch, et al., application number 91301348.8 to which the reader is urged to refer. To calculate intermediate carries, a redundant cell, e.g., block 116 may always be added. Such a cell is offset from the rest of the tree so that intermediate carry values may be completed. In FIG 11B, block 116 is used to complete carries 24 and 40. It should be noted that the introduction of the redundant cell does not add more gate delays. In another variation, all of the blocks on the first logic level may be deleted from the tree shown in FIGS. 11A and 11B, and the bit propagate and generates sent directly into the second level. This new configuration can produce every other carry for a 16 bit add in two gate delays. The addition of further redundant cells can be used to find all of the carries without increasing the number of gate delays. An important aspect of the present invention relates to the Manchester Carry Chain block, e. g. , block 110 shown in FIG 14. The basic tree node is essentially, as should be appreciated now by those skilled in the art, two distinct circuits put together. The left side is the Manchester Carry Chain and the right side is a NAND gate chain. According to the teachings of this invention, special carry lookahead trees may be made of any radix. One skilled in the art can see that the same principles described in this patent may still be applied. As another example, an 8 tree may be constructed by allowing each node to have 8 children. The principles taught in this patent will still apply. A 3 tree will have log base 3 performance, while an 8 tree will have log base 8 performance. Of course, the log base 8 tree will produce a very sparse set of carries, and have very large tree nodes. It should now also be appreciated that a circuit according to the present invention arranges fundamental carry chains in to a high radix tree. This circuit is, in essence, an improvement over binary carry lookahead circuits. The reason the circuit is an improvement is because it incorporates a high radix technique which has better load and speed characteristics than binary carry lookahead circuits. The circuit according to the present invention has log base radix of N gate delays, where N is a size to the add, and radix is the multiplicity of the tree. Additionally, a circuit according to the present invention uses only three simple sub blocks. Also, the circuit is an improvement because of the ease of finding intermediate carries. Those skilled in the art should appreciate that the circuit shown in FIGS. 11A and 11B may be easily pruned for carry lookaheads of sizes other than 4 to the ith power, with i being equal to 1, 2, 3,... . Notwithstanding such scaling being undertaken, the circuit shown in FIGS. 11A and 11B should lose little speed when scaled. For example, a 64 bit carry lookahead should require three gate delays, whereas a 256 bit carry lookahead would require merely four gate delays. Those skilled in the art should now fully appreciate that the present invention provides an improvement over binary carry lookahead circuits. The circuit according to the teachings of the present invention solves the problem of doing a large add in a short amount of time with a relatively small electronic circuit. The circuit according to the present invention is faster and relatively smaller than the ones in the past. It has log base 4 of N gate delays where N is the size of the add, while using three simple sub blocks. Other important aspects of the present invention have been previously discussed. Those skilled in the art will recognize that many modifications and variations besides those specifically mentioned above may be made in the construction techniques described herein without departing from the concept of the present invention. Accordingly, it should be appreciated that within the scope of the appended claims, the present invention may be practiced otherwise than as specifically described herein.

Claims: A carry lookahead tree-type logic circuit for use in a two-operand adder comprising: a plurality of tree nodes consisting of subcircuits (78-116); characterized by each of the subcircuits having eight input terminals, two output terminals, and an internal logic circuit including a carry chain portion; the subcircuits being connected to form a three level tree with fourteen first level subcircuits (78-104) and four second level subcircuits (106-112); each of the first level subcircuits being operable to produce block propagate and generate terms for four bit-generate and four bit-propagate input positions of the operands on its input terminals; three of the second level subcircuits (108-112) being connected to receive the block propagate and generate terms produced by four first level subcircuits and to produce block propagate and generate terms therefrom; and wherein the fourth of the second level subcircuits (106) is connected to receive the block propagate and generate terms produced by two first level subcircuits (78, 80) and in that two of the said subcircuits (114, 116) are on the third level of the tree, one of the third level subcircuits (114) being connected to receive the block propagate and generate terms produced by the four second level subcircuits (106-112) and to produce block propagate and generate terms therefrom; the other third level subcircuit (116) being connected to receive block propagate and generate terms from two of the second level subcircuits (108, 110) and to further make those signals available as an output for obtaining carry signals therefrom; and whereby the said other third level subcircuit (116) provides information as to intermediate carries on 8-bit boundaries of the tree. A circuit according to claim 1 in which the tree is a radix 4 carry lookahead tree. A circuit according to claim 1 or 2, wherein the internal logic circuit comprises a NAND gate portion consisting of a chain of gates coupled for performing a logical NAND on propagate inputs along the chain of gates. A circuit according to claim 2, wherein the said other subcircuit (116) at the third level receives propagate and generate signals from two of the second level subcircuits (110, 112), only one of which (110) it also receives carry information from.

Inventors: LYNCH THOMAS W, MCINTYRE STEVEN D, LYNCH, THOMAS W., MCINTYRE, STEVEN D.
Applicants: ADVANCED MICRO DEVICES INC, ADVANCED MICRO DEVICES, INC.
Application year: 1991
Main classification: G06F7
IPC codes: G06F7