Method and apparatus for performing division using a rectangular aspect ratio multiplier

Abstract: A method and apparatus for performing division is described which first comprises approximating the short reciprocal of the divisor. A reciprocal bias adjustment factor is added to the approximation and the correctly biased short reciprocal is multiplied by a predetermined number of the most significant bits of the dividend and the product is truncated to generate a first quotient digit value. The multiplication takes place in a multiplier array having a rectangular aspect ratio with the long side having a number of bits at least as large as the number of bits required for the divisor. The short side of the multiplier array has a number of bits slightly greater by several guard bits than the number of bits required for a single quotient digit value, which is also determined to be the number of bits in the short reciprocal. The quotient digit value is multiplied by the full divisor and the exact product is subtracted from the dividend to yield an exact partial remainder. The described steps are repeated to serially generate quotient digit values with exact partial remainders with the preceding partial remainder taking the place of the dividend. The quotient digit values are accumulated to yield a complete quotient. The complete quotient is decremented and the remainder recalculated if the final partial remainder is negative, yielding the full precision unique quotient and non-negative remainder pair.

Description: TECHNICAL FIELD OF THE INVENTION This invention relates in general to the field of performing mathematical functions using electronic devices. More specifically, the present invention relates to a method and apparatus for performing the division function in a system using a rectangular aspect ratio multiplier circuit. BACKGROUND OF THE INVENTION The arithmetic unit is one of the most important components of any integrated electronic data processing system. Arithmetic units perform a wide variety of mathematical functions upon operands which are transmitted from other portions of an integrated system. The basic addition, subtraction and multiplication functions are quickly and efficiently performed in arithmetic units today. However, presently available techniques for performing division functions have not been completely satisfactory with respect to efficiency and speed. A common method of performing division in arithmetic systems presently available is through the use of commonly known SRT procedures. In SRT division, the digits of the quotient are developed serially a certain number of bits at a time using table look-ups or programmable logic arrays (PLA) to logically determine each quotient digit as a function of the leading bits of the partial remainder and divisor. An exact new partial remainder is calculated after each digit so that the process may continue indefinitely. A key disadvantage of SRT division is that because of the limitations of the look-up table size, no more than three or four bits per quotient digit can be calculated in any one step. Thus, the division operation using the SRT system takes many steps or iterations. In effect the time required for SRT division grows linearly with the number of bits of precision, and becomes relatively slower in comparison to certain approximation techniques for higher precision division operations. A more recently developed system employs a division system using a Newton-Raphson approximation technique. In this system, an approximation of the reciprocal of the divisor is calculated using an iterative process to achieve a value for the reciprocal in a full precision format. The full precision reciprocal approximation is then multiplied by the full precision dividend to achieve an estimate of the quotient. Only a bound on the indeterminate error of the estimated quotient is known and this information is inadequate for implementation of precise rounding. To achieve precise rounding the indeterminacy in the error is removed by a second full precision multiplication. In the second full precision multiplication step, the divisor is multiplied by the quotient and a corresponding exact remainder is computer. This Information is then sufficient to allow for the appropriate IEEE standard rounding procedures. The Newcon-Raphson division sequence is superior to the SRT division, but still contains a major disadvantage. The Newton-Raphson division requires two full precision multiplies which are time consuming. The Convergence Division Method, which is effectively a variation of the Newton-Raphson division process, requires similar steps to remove the indeterminacy in the error to effect IEEE standard roundings. EP-A-0 154 182 describes a prescaled divide technique. Initially, the divisor is multiplied by an approximate reciprocal (obtained by look-up) to obtain a correction factor (i.e., a scaled divisor), and the dividend is multiplied by the approximate reciprocal to obtain a first provisional quotient (i.e., a scaled divisor or first scaled remainder). In successive iterations, successive provisional quotients are processed using the correction factor (scaled divisor) to generate a succession of partial quotients (i.e., quotient digits). See, the Abstract and page 3, line 18 to page 4, line 5. US-A-3,828,175 describes prescaled divide including using Newton-Raphson to obtain an approximate reciprocal to use as a prescale factor. Quotient bytes Q are produced using approximate reciprocal divisors (Dp) -1 derived from an initial table-lookup approximate reciprocal divisor (Dt) -1 - the exact divisor Do is not used. EP-A-0 377 992 describes a variation of the conventional Newton-Raphson division method in which a reciprocal estimate is improved on each cycle. An initial quotient estimate is obtained using a table-lookup divisor reciprocal estimate - in each of successive iterations, the precision of the reciprocal estimate is increased by computing an error parameter. Therefore, a need has arisen for a system which uses a division process which results in an exact result which can be used for appropriate IEEE standard rounding procedures, but which is less time consuming than and more efficient than previously developed systems. SUMMARY OF THE INVENTION This invention relates to a circuit for performing exact division as claimed in claim 1. The invention further relates to a method as claimed in claim 9. The division system of the present invention first determines an approximation of the reciprocal of the divisor, hereinafter referred to as the short reciprocal, accurate to a number of bits needed to substantially fill the smaller side of a rectangular aspect ratio multiplier circuit. The division system then develops quotient digit values corresponding to a very large radix. This large radix is substantially equal to the number of bits of the smaller side of the rectangular mulitplier. The precision required for the short reciprocal is limited to one digit in this large radix plus appropriate guard bits. Importantly, the error in the short reciprocal can be left indeterminate as only a bound on the error of the reciprocal value is needed for the process, thus eliminating a time consuming feature of the Newton-Raphson with IEEE standard rounding process. Each quotient digit value is determined by mulitplying the short reciprocal of the divisor by the partial remainder in the rectangular multiplier and appropriately truncating the result. The quotient digit values are determined serially with exact remainders. Each quotient digit value determined by the technique is one of at most two possible values in the large radix system where the new signed remainder corresponds to less than a unit of value in the quotient digit determined. Such signed remainders are then sufficient for simplified implementation of all IEEE standard roundings. Through the use of a rectangular multiplier, no full precision multiplication steps are required. An important technical advantage of the present invention inheres in the fact that it uses a rectangular aspect ratio multiplier circuit. The use of the rectangular multiplier saves time in several places in the division process. Each of the multiplication steps used to form the quotient digit values are much simpler functions than full precision multiplication. Further time savings result from the fact that the initial estimation of the reciprocal of the divisor need only be estimated to the precision of the shorter side of the rectangular multiplier. This saves the multiplication steps necessary in the Newton-Raphson iterations to expand the accuracy of the estimation to a full precision width, as well as saving the subsequent full precision multiplications employed to remove the indeterminacy in the Newton-Raphson quotient approximation. BRIEF DESCRIPTION OF THE DRAWINGS A more complete understanding of the present invention may be acquired by referring to the detailed description and claims when considered in connection with the accompanying drawings, wherein: FIGURE 1 is a flow chart illustrating the method of division used in the arithmetic system of the present invention; FIGURE 2 is a flow chart illustrating a variation of the Newton-Raphson estimation technique used to approximate the reciprocal of the divisor to be used in the division system of the present invention; FIGURE 3 is a block diagram of the arithmetic system of the present invention; and FIGURE 4 is an example of the division method of the present invention using base 10 numbers. DETAILED DESCRIPTION OF THE INVENTION The arithmetic unit of the present invention utilizes a novel method for performing the division function. This method is shown in flow chart form in FIGURE 1. The method illustrated is specially suited to operate in an arithmetic unit which comprises a rectangular aspect ratio multiplier. The arithmetic unit of the present invention may comprise, for example, a rectangular multiplier having an aspect ratio of 19 x 69 bits. This multiplier may be used to perform exact division of 68 bit numbers by generating four 17-bit quotient digits. The desired full precision 68 bit quotient with positive remainder is viewed in the method of the present invention as composed of four 17-bit digits employing the large radix 2 17 . The method shown in FIGURE 1 is used to divide a dividend x by a divisor y. The division takes place by approximating a reciprocal of the divisor to a precision less than the precision of the divisor to obtain a short reciprocal R. Quotient digit values, q i , are serially determined and accumulated to generate a quotient Q. Partial remainders are generated and stored in a register z. The method will be described with reference to an array multiplier having an aspect ratio of 19 x 69 bits. It should be understood, however, that the division method of the present invention is applicable to a wide range of rectangular aspect ratio multipliers. The particular rectangular multiplier described herein is an embodiment chosen for the purposes of teaching the present invention, and should not be construed to limit the scope of the present invention as claimed. Referring to FIGURE 1, the method begins at step 10 wherein the partial remainder register z is loaded with the value of the dividend x. It should be understood that the method presupposes that the dividend is a 68 bit number normalized to be less than one. Therefore, the most significant bit of the partial remainder register z is equal to O. The method then proceeds to step 12 where the short reciprocal R of the divisor is determined to (N + k) bits of accuracy. N is determined to be the number of bits in the large radix associated with the quotient digits. Here N = 17, and k is a limited number of guard bits, for example, k here equals 2. According to the present embodiment, the short reciprocal R approximates the exact reciprocal to nineteen bits of accuracy. The approximation step 12 uses a variation of the Newton-Raphson approximation technique which will be described more fully with reference to FIGURE 2. A first quotient digit value is calculated in step 14 by multiplying the partial remainder register z by the short reciprocal R, generating a product 88 bits wide which is truncated to form a single 17-bit quotient digit value. The term digit is used herein with reference to the large radix 2 17 and may have any positive or negative integer value having a magnitude of 2 17 -1 or less. In the case of a rectangular aspect of ratio 19 x 69 bits, four quotient digit values are required for the complete 68-bit quotient of two 68-bit numbers. Thus, four passes through the multiplier will be required to generate the four quotient digit values. The method proceeds to step 16 where the quotient digit value generated is accumulated. In this manner, as each quotient digit value is determined, the complete quotient Q is accumulated to 17 more bits of precision and stored. In step 18, the partial remainder register z is updated for the calculation of the next quotient digit value. The new z register value is equal to the difference between the initial partial remainder and the product of the preceding quotient digit value and the divisor. The method then returns to step 14 where the next quotient digit value is generated by taking the product of the new partial remainder and the short reciprocal. In this manner, the quotient digit values are generated in series along with intermediate exact remainders. At the end of the process, an exact remainder of the full precision quotient is available for further processing. Although the quotient remainder pair is not unique at this point due to the fact that the remainder may be either positive or negative, precise rounding can be performed at this point by suitable conditional rounding logic. According to the embodiment disclosed herein, a correction step is performed to obviate the need for conditional rounding logic. Using the 19 x 69 bit rectangular multiplier of one embodiment of the present invention, the division process requires the generation of four quotient digit values to complete a full precision division function. Each quotient digit requires a multiplication step and a combined multiplication and subtraction step corresponding to step 14 and step 18, respectively. An important technical advantage of the rectangular multiplier of the present invention, which will be discussed in more detail with reference to FIGURE 3, is that the multiplier also comprises an additional adder port. The additional adder port makes it possible to perform a 17 x 69 bit multiplication step and an addition step in one pass through the rectangular multiplier. Accordingly, the operation shown in step 18, which comprises a 17 x 69 bit product and a difference, can be accomplished in a single pass through the rectangular multiplier. The quotient remainder pair may be made unique by passing the quotient and the remainder through a correction sequence illustrated by step 20 in FIGURE 1. Because of steps taken in the estimation of the reciprocal in step 12, the correction sequence itself is fairly simple. If the remainder is negative, the quotient is decremented by one, and the remainder is recalculated. The recalculation of the remainder comprises adding the divisor to the remainder. This simple correction sequence is possible because the approximation of the reciprocal generated in step 12 is generated in a manner such that the approximated reciprocal, when multiplied by the partial remainder, will generate quotient digit values which are always either the exact truncated value for the quotient digit or one unit too large in the least significant bit position of the quotient digit as truncated. Because the approximation is carefully limited to these two possible results, exact division is carried out since the resulting quotient and remainder of any division operation is such that the simple correction sequence described above yields a unique full precision quotient with positive remainder. Note, that it is a convenience of this teaching to assume that the remainder must be corrected to a positive value to produce a unique quotient. A unique quotient may also be produced by consistently forcing a negative remainder. Either unique quotient remainder pair may be considered the result of exact division. A novel version of the Newton-Raphson estimation technique used to calculate the aforementioned short reciprocal value is shown in flow chart form in FIGURE 2. It should be understood that the method presupposes that the divisor is normalized into typical floating point format such that the divisor y is greater than or equal to one and less than two. The method begins at step 22, where a look-up table is used to find a reciprocal seed value y' should be understood that the method presupposes that the reciprocal seed value y' is normalized into typical floating point format such that y' is greater than or equal to one-half and less than one. As discussed previously, the look-up table can only achieve a small number of bits due to the limits in the size of the table. y' is thus used as a seed value and the number of accurate bits in the approximation is increased through an iterative process. In the present embodiment, the seed value, y', is chosen to be of sufficient accuracy to produce an approximate reciprocal with error less than 2 -22 before addition of the reciprocal bias adjustment factor. The method proceeds to step 24 where the first step of the iterative process is used to compute y" which is equal to the product of y' and the difference of two and the product of y and y'. The method then proceeds to step 26 where the computation of an approximate reciprocal value, y‴, is similarly calculated through an additional iteration of the Newton-Raphson approximation equation as shown. It should be understood that y' or y" could be used as the approximate reciprocal value if a different size multiplier were used in a different embodiment of the present invention requiring a smaller number of accurate bits in the short reciprocal R. The method concludes at step 28 where the final value of the short reciprocal is achieved by adding the value of the approximate reciprocal value, y‴, to a reciprocal bias adjustment factor, epsilon and appropriately truncating the result. Epsilon is a statically generated quantity dependent upon the digit size of the multiplier array. Epsilon is equal to the sum of two terms. The first term is equal to 2 -(N+k) where, as discussed previously N is equal to the number of bits of the radix of the quotient digit values and k is a predetermined number of guard bits. The second term may be any value less than the first term. For an embodiment of the present invention using a multiplier array having an aspect ratio of 19 x 69 bits, epsilon is equal to 2 -19 + 2 -22 . The short reciprocal R can then be used in the method illustrated in FIGURE 1 to yield a quotient and remainder which is capable of yielding a unique exact result through the simple correction technique discussed above with reference to step 20 of FIGURE 1. Each iteration of the Newton-Raphson equation may require only two passes through a rectangular aspect ratio multiplier if the multiplier includes an additional adder port. As discussed previously, because of the inclusion of an additional adder port, the (2-yy') term may be calculated in a single pass through the rectangular multiplier. It should be understood that the method of division of the present invention does not depend upon the particular method used to calculate the short reciprocal R. The above described variation on the Newton-Raphson process is merely one possible method of generating this value. For example, a version of the Newton-Raphson approximation technique using a single iteration or more than two iterations to generate the approximate reciprocal value would be appropriate in system using a multiplier which required a short reciprocal having less or more bits of accuracy, respectively, than the embodiment described herein. Further, if an embodiment of the present invention required an even smaller number of accurate bits in the short reciprocal, a direct table look-up of either the approximate reciprocal value prior to the addition of the reciprocal bias adjustment factor or a direct table look-up of the short reciprocal already containing the bias adjustment factor would be practical. The method described with reference to FIGURE 2 is described for the purpose of teaching the present invention and should not be construed to limit the scope of the invention to this or any particular method of generating the short reciprocal R. FIGURE 3 is a block diagram of one circuit embodiment capable of performing the method of division of the present invention. Referring to FIGURE 3, a circuit, indicated generally at 30, uses a system bus 32 for communication between a microprocessor [not shown] and an arithmetic coprocessor comprising circuit 30. System bus 32 may include, for example, the data lines, address lines and control lines from the microprocessor. Coupled to the system bus 32 are a D latch 34, a C latch 36 and an E latch 38. Generally, the D and C latches 34 and 36 receive operands from the microprocessor and store the operands to be used in an arithmetic operation and the E latch 38 serves to store the output of the operation. The D latch is coupled through a first multiplexer 40 to a rectangular aspect ratio multiplier array 42. The C latch 36 is coupled to the multiplier array 42 through a second multiplexer 44. The C latch 36 is coupled to the short side of the multiplier array 42 while the D latch 34 is coupled to the long side of the multiplier array 42. The short side of the multiplier array 42 comprises 18 bits and the long side of the multiplier array 42 comprises 69 bits. Multiplier array 42 comprises a series connection of parallel adder arrays. The output of the multiplier array is 87 bits wide and forms one input into a first adder 46. The second port of first adder 46 serves as the additional adder port of the multiplier which was described previously. The second port of first adder 46 is coupled to the output of a second adder 48 which has at its inputs a constant port 50 and the output of the feedback register 54. Sixty-nine bits of the output of the feedback register 54 are also coupled to a second input port of the first multiplexer 40, thereby permitting an 18 x 69 bit product of feedback register 54 with second multiplexer 44 to be conditionally summed again with the contents of feedback register 54 which is passed through shifter 52 yielding a 19 x 69 bit total product at the output of first adder 46. When the divisor is equal to or near 1.0, the short reciprocal will be equal to or slightly greater than one. This causes the 19 bit short reciprocal to overflow leaving a O in the most significant bit position. This condition is detected by examining the most significant bit, and causes shifter 52 to shift left by one which has the effect of adding in twice the contents of the feedback register 54. An important technical advantage of the adder 46 is its ability to detect overflow and saturate the resulting sum. During the computation of the quotient digit values, the product of a short reciprocal and the dividend could create overflow. Therefore, the saturation feature of adder 46 is operable to provide a maximum sum corresponding to a 1 on all output bits of the adder 46. The output of the first adder 46 is coupled to the input of a first shifter 55. First shifter 55 operates to shift the output of first adder 46 to the right or left by one place. This shifting is used to keep the maximum number of significant data bits flowing in the data path. For example, products involving the reciprocal of the divisor as an operand will automatically contain a leading zero due to the normalization of the divisor. This leading zero can be shifted off initially and later shifted back to allow for an additional significant bit to remain in the data path. The output of first shifter 55 is input into a result register 56. The output of the result register 56 is fed into two separate locations. The output is first fed into a second shifter 58 which is coupled between the result register 56 and the input to the feedback register 54. Shifter 58 is used to shift values in the data path to the left by 17 bits. Shifter 58 is used to once again maintain as many significant data bits as possible in the data path by shifting out bits whose value is known. Because of the features of the method of the present invention, the initial 17 bits of the result of the subtraction step generating the succeeding partial remainder are always 0. This is due to the fact that the initial digits of the operands of this subtraction step always cancel. These 0 bits are therefore shifted out to the left to allow for 17 additional significant data bits to remain in the data path. The output of the result register 56 is input into the E latch 38 which as described previously, is coupled to the system bus 32. The system bus 32 is also coupled to an accumulator circuit, indicated generally at 70. Accumulator 70 comprises an adder 72 which has one of its ports coupled to the system bus 32. The remaining port of adder 72 is coupled to a shifter 74. The output of adder 72 is input into a quotient register 76 which is also coupled to the input of shifter 74. As described previously, the basic operation used to perform the novel division algorithm of the present invention is the multiplication operation. It is important to distinguish between different types of multiplication operations, however. Prior art methods of performing division calculated a full length, full precision approximation of the reciprocal of the divisor and then performed a full precision, "long-by-long" multiplication. An additional full precision multiplication was then used to correct the result. The division method of the present invention does not require any full precision multiplications. The multiplication operations necessary for the present method are much simpler and quicker "short-by-long" rectangular multiplications. In order to complete a single short-by-long multiplication using the arithmetic circuit 30, the multiplicand is loaded into the D latch 34, and the multiplier is loaded into the C latch 36. The multiplier comprises the "short" operand comprising 18 bits which is input into the short side of the rectangular multiplier array 42. The multiplicand comprises the "long" operand comprising 69 bits which constitutes a full precision operand which is input into the long side of the rectangular multiplier array 42. The multiplicand passes through first multiplexer 40 and is input into the multiplier array 42. The 18 bits of the multiplier are input from the second multiplexer 44 into the short side of the multiplier array 42. The product of the multiplier and of the multiplicand comprises a product 87 bits long. This product is passed unchanged through the first adder 46 and the second shifter 55 to the result register 56. The product is then input into the E latch 38 where it is available to the system bus 32 to be output from the arithmetic coprocessor. Alternatively, the product may be returned to the multiplier array 42 or adders 48 or 46 for other computations by passing through shifter 58 to feedback register 54. As stated previously, the method of division of the present invention does not involve any full precision multiplication operations. Generally, the method of division begins with the approximation of the reciprocal of the divisor and the digits of the quotient are serially generated by multiplying the approximation of the reciprocal by the current partial remainder. An understanding of the method of the division of the present invention is more easily acquired if the division operation is examined using an example using base 10 numbers. FIGURE 4 illustrates an example of the method of division of the present invention as it is used to divide .3657483750 by .784731. As discussed previously, the method of the present invention involves large radix division. The radix of the illustrated example in FIGURE 4 is 100. Thus, the numerals of the operands have been grouped in groups of two. Each group of two numerals comprises a "digit" of radix 100. This is important as the quotient digit values will be generated and accumulated one digit at a time. The method of the present invention begins by calculating a truncated and biased approximate reciprocal of the divisor, .784731. The short reciprocal is shown to be equal to 1.28. The actual value of the reciprocal of .784731 is equal to 1.2743.... The short reciprocal value used is slightly larger than the actual value of the reciprocal. The choice of 1.28 as the short reciprocal corresponds to the addition of the reciprocal bias adjustment factor shown in step 28 of FIGURE 2. The biased value of the reciprocal must be either exactly the value of the reciprocal or slightly larger. This must be true to insure that the value of the quotient digit values are always equal to or greater by one unit than the exact value of the quotient digit. As long as the quotient digit value is larger than the actual value of the digit, and any error is less than one unit in the last place of the digit, any error in the digit value can be offset by having the succeeding digit calculated be negative. Because of these features, the error involved in the method of the present invention is strictly controlled as is illustrated in the example shown in FIGURE 4. Referring to FIGURE 4, initially, the approximate reciprocal 1.28 is multiplied times the dividend .3657483750 to yield .468157. This value is truncated to generate the first quotient digit value, .46. In the next step, the first quotient digit value, .46, is multiplied times the divisor, .784731, to yield .36097626. This product is subtracted from the dividend, which functions as the original partial remainder, to yield the next partial remainder, .47721150. It is important to recognize that in the subtraction step used to generate the next partial remainder, the most significant digits of the operands of the subtraction operation cancel out. This fact is indicative of the earlier stated feature of this method that the error in the truncated quotient digit value is less than one unit in the last place of the quotient digit. If the error was larger than one unit in the last place, the initial digits would not necessarily cancel in the subtraction operation. In the next step, the short reciprocal, 1.28, is multiplied times the current partial remainder, .47721150, to yield .610830. This product is truncated to yield the next quotient digit value, .61. .61 is then multiplied times the divisor, .784731, to yield .47868591. This number is then subtracted from the partial remainder to yield -.14744100. The negative partial remainder indicates that the prior quotient digit value was too large. However, because the partial remainder is negative, the multiplication of the partial remainder and the reciprocal in the next step yields a negative quotient digit value. The negative quotient digit value then implicitly corrects the prior quotient digit value. Accordingly, the partial remainder, -.14744100, is multiplied times the short reciprocal, 1.28, to yield -.188724. This number is truncated to yield the next quotient digit value, -.18. The method continues for the generation of two more quotient digit values, -.79 and .12. The method can be terminated after generating any number of quotient digit values and an exact remainder will be available, or the method can be continued indefinitely. The method illustrated by the base 10 example shown in FIGURE 4 is directly applicable to the circuit shown in FIGURE 3, the only difference being the circuit shown in FIGURE 3 utilizes operands in binary signed digit format. Further, the digit length of the quotient digits generated by the circuit shown in FIGURE 3 are seventeen bits long. This corresponds to a radix of 2 17 = 131,072. In order to perform the division method of the present invention using circuit 30, the approximation of the reciprocal is generated as described previously and stored in a portion of C latch 36. The dividend is loaded into the feedback register 54 by passing it unchanged from the system bus 32 through circuit 30. The divisor is loaded into the D latch 34. In order to generate the first quotient digit value, the dividend is multiplied by the reciprocal in the multiplier array 42. The seventeen most significant bits of the product of this multiply constitute the first quotient digit value. The current quotient digit value is then loaded into a remaining portion of C latch 36. The quotient digit value is also loaded through adder 72 into quotient register 76. The next partial remainder is calculated by multiplying the divisor stored in the D latch 34 times the current quotient digit value stored in the C latch 36 and subtracting this amount from the dividend which is stored in the feedback register 54. The dividend is fed to second adder 48, and is passed to first adder 46 where the product of the divisor and the current quotient digit value is subtracted. The new partial remainder is shifted to the left seventeen bits in third shifter 58. As described previously, the first seventeen bits of the partial remainder are all zero resulting from the fact that the initial digit of the operands of the subtraction operation cancel out as was discussed with reference to FIGURE 4. The shifted partial remainder is then loaded into feedback register 54. The circuit is then ready to generate the next quotient digit value in the same manner as discussed above. Each succeeding quotient digit value is accumulated by adding it to the preceding quotient digit values in adder 72 and loading the total in quotient register 76. The preceding quotient total is appropriately shifted to the left by 17 bits by shifter 74 before it is added to the current quotient digit value. These steps are repeated until four quotient digit values have been accumulated and an exact remainder is available. The circuit then performs a correction sequence based on the value of the final partial remainder. If the final partial remainder is negative, the accumulated quotient is decremented by one, and the divisor is added to the final partial remainder. In summary, the present invention provides a method of performing exact division which comprises approximating the reciprocal of the divisor and serially generating large radix quotient digit values and exact remainders. A reciprocal bias adjustment factor is added to the approximation of the reciprocal to insure that any error within a particular quotient digit value will be limited to one unit of error in the last place of the truncated digit. This is to ensure that the error in the digit can be compensated for in the calculation of the remaining digit values. The particular circuit embodiment described herein uses a rectangular multiplier array having an aspect ratio of 18 bits by 69 bits including an additional adder port. The rectangular multiplier of this circuit is particularly suited to the division operation of the present invention as the short side of the multiplier array comprises substantially the same number of bits as a single quotient digit value. Although the invention has been described in connection with the particular circuit embodiment, it should be understood that the method of division of the present invention is equally applicable to a large number of multipliers with widely varying aspect ratios using either non-redundant or signed digit format as well as circuits which do not utilize an array multiplier. The disclosure of the particular circuit described herein is for the purposes of teaching the present invention and should not be construed to limit the scope of the present invention which is solely defined by the scope of the appended claims.

Claims: A circuit for performing large radix full precision division of a dividend by a divisor comprising: product circuitry (34, 36, 40, 42, 44) including a rectangular aspect ratio multiplier (42) with a multiplicand input that is of a multiplicand size corresponding to the size of the multiplicand, and a multiplier input that is of a short size which is less than the multiplicand size; short reciprocal circuitry (42, 46, 48, 50) coupled to said product circuitry (34, 36, 40, 42, 44) for generating a short reciprocal of said divisor, where said short reciprocal is determined to N + k bits of accuracy, with N being the number of bits in the large radix associated with the quotient digits and k is a limited number of guard bits, said short reciprocal being a truncated biased approximate reciprocal either exactly equal to or slightly larger than the actual value of the reciprocal, said short reciprocal being of said short size; quotient digit circuitry (34, 40, 42) coupled to said short reciprocal circuitry (42, 46, 48, 50) and to said product circuitry (34, 36, 40, 42, 44) for computing a quotient digit value of substantially said short size by multiplying said short reciprocal of said divisor by said dividend in said product circuitry, such that said quotient digit value is either the exact truncated value for the quotient digit or one unit too large in the least significant bit position of the quotient digit as truncated; partial remainder circuitry (34, 40, 46) coupled to said product circuitry (34, 36, 40, 42, 44) for computing a partial remainder as the difference between said dividend and said product of said divisor and said quotient digit value; iterative circuitry (54, 55, 56, 58) coupled to said quotient digit circuitry (34, 40, 42), said product circuitry (34, 36, 40, 42, 44), and said partial remainder circuitry (34, 40, 46), said iterative circuitry (54, 55, 56, 58) operable to generate a desired number of succeeding quotient digit values by substituting a preceding partial remainder for said dividend and repeating said computations; full precision quotient circuitry (70) coupled to said quotient digit circuitry for appropriately shifting and accumulating said quotient digit values into a full precision quotient. The circuit of Claim 1 wherein said circuitry for generating said short reciprocal (42, 46, 48, 50) comprises: circuitry (46, 48, 50) for adding a reciprocal bias adjustment factor chosen to offset accumulated error in an approximate reciprocal and bias said short reciprocal to produce quotient digit values which, when accumulated to form a quotient, are always at most one unit greater than or exactly equal to the exact value of the quotient truncated to a predetermined number of bits. The circuit of Claim 2 wherein said reciprocal bias adjustment factor is equal to the sum of reciprocal bias adjustment factor is equal to the sum of a first and second terms, said first term equal to 2 -(N+k) the where N is equal to the number of bits of the radix of the quotient digit values and k is a predetermined number of guard bits, said second term being less than said first term. The circuit of Claim 2 wherein said reciprocal bias adjustment factor is equal to the sum of 2 -19 and 2 -22 . The circuit of Claim 2 wherein said quotient digit values give rise to a negative partial remainder when said quotient digit values are greater than said exact value, said negative partial remainder causing a subsequent quotient digit value to be negative, thereby causing a product of said subsequent quotient digit and said divisor operable to reduce the magnitude of said negative partial remainder and, when combined with a preceding quotient digit value, producing a borrowing from the least significant bit of said preceding quotient digit value. The circuit of Claim 1 wherein said circuitry (42, 46, 48, 50) for generating said short reciprocal comprises: look-up table circuitry for storing a plurality of reciprocal seed values; retrieval circuitry coupled to said look-up table circuitry for retrieving a particular reciprocal seed value associated with said divisor; circuitry (34, 36, 40, 42, 46, 48, 50, 54, 58) associated with said retrieval circuitry for computing the difference between twice said particular reciprocal seed value and the product of said divisor and the square of said particular reciprocal seed value to yield a first reciprocal approximation; and circuitry (34, 36, 40, 42, 46, 48, 50, 54, 58) for computing the difference between twice said first reciprocal approximation and the product of said divisor and the square of said first reciprocal approximation to yield a second reciprocal approximation. The circuit of Claim 6 wherein said circuitry (42, 46, 48, 50) for obtaining said short reciprocal of said divisor further comprises: circuitry (34, 36, 40, 42, 46, 48, 50, 54, 58) for computing said short reciprocal equal to the sum of a prior reciprocal approximation and a unique reciprocal bias adjustment factor chosen to offset accumulated error in said prior reciprocal approximation and bias said short reciprocal to produce quotient digit values which, when accumulated to form a partial quotient are always at most one unit in the last place greater than or exactly equal to the exact value of the quotient truncated to a predetermined number of bits. The circuit of Claim 7 wherein said prior reciprocal approximation is equal to said second reciprocal approximation. A method of performing large radix full precision division of a dividend by a divisor using a rectangular aspect ratio multiplier having a multiplicand input that is of a multiplicand size corresponding to the size of a multiplicand, and a multiplier input that is of a short size which is less than the multiplicand size, comprising the steps of: generating a short reciprocal of the divisor, where said short reciprocal is determined to N + k bits of accuracy, with N being the number of bits in the large radix associated with the quotient digits and k is a limited number of guard bits, said short reciprocal being a truncated biased approximate reciprocal either exactly equal to or slightly larger than the actual value of the reciprocal, said short reciprocal being of said short size; computing a quotient digit value of substantially said short size by multiplying, in the rectangular aspect ratio multiplier, said short reciprocal of said divisor by said dividend, such that said quotient digit value is either the exact truncated value for the quotient digit or one unit too large in the least significant bit position of the quotient digit as truncated; computing, in the rectangular aspect ratio multiplier, a product of said divisor and said quotient digit value; computing a partial remainder as the difference between said dividend and said product of said divisor and said quotient digit value; and generating a desired number of quotient digit values by reiterating said steps of computing a quotient digit value, computing a product, and computing a partial remainder, substituting a preceding partial remainder for said dividend when reiterating said steps of computing a quotient digit value and computing a partial remainder; and appropriately shifting and accumulating said quotient digit values into a full precision quotient. The method of Claim 9 wherein said step of generating a short reciprocal comprises the step of adding a reciprocal bias adjustment factor chosen to offset accumulated error in a prior reciprocal approximation and bias the short reciprocal to produce quotient digit values which, when accumulated to form a quotient, are always at most one unit greater than or exactly equal to an exact value of the quotient truncated to a predetermined number of bits. The method of Claim 10 wherein said quotient digit values give rise to a negative partial remainder when said quotient digit values are greater than said exact value, said negative partial remainder causing a subsequent quotient digit value to be negative, thereby causing a product of said subsequent quotient digit and said divisor operable to reduce the magnitude of the negative partial remainder and, when combined with a preceding quotient digit value, producing a borrowing from the least significant bit of said preceding quotient digit value. The method of Claim 10 wherein said step of generating a short reciprocal of said divisor comprises the steps of: retrieving a reciprocal seed value from a table containing a plurality of values; computing a first reciprocal approximation equal to the difference between twice said reciprocal seed value and the product of said divisor and the square of said reciprocal seed value; and computing a second reciprocal approximation equal to the difference between twice said first reciprocal approximation and the product of said divisor and the square of said first reciprocal approximation. The method of Claim 12 wherein said step of obtaining a short reciprocal of said divisor further comprises the step of: computing the short reciprocal equal to the sum of a prior reciprocal approximation and a unique reciprocal bias adjustment factor chosen to offset accumulated error in the prior reciprocal approximation and bias the short reciprocal to produce quotient digit values which, when accumulated to form a partial quotient, are always at most one unit in the last place greater than or exactly equal to the exact value the quotient truncated to a predetermined number of bits. The method of Claim 13 wherein said prior reciprocal approximation is equal to said second reciprocal approximation. The method of Claim 10 wherein said reciprocal bias adjustment factor is equal to the sum of first and second terms, said first term equal to 2 -(N+k) where N is equal to the number of bits of the radix of the quotient digit values and k is a predetermined number of guard bits, said second term being less than said first term. The method of Claim 10 wherein the reciprocal bias adjustment factor is equal to the sum of 2 -19 and 2 -22 . The method of Claim 9 wherein if a final partial remainder is negative, said final partial remainder is corrected by adding said divisor to said final partial remainder.

Inventors: BRIGGS WILLARD STUART, MATULA DAVID WILLIAM, BRIGGS, WILLARD STUART, MATULA, DAVID WILLIAM
Applicants: CYRIX CORP, CYRIX CORPORATION
Application year: 1990
Main classification: G06F7
IPC codes: G06F7