The present invention relates to systems and methods for multiplying binary numbers using electronic circuits. The present invention may be used to create very large scale integration (“VLSI”) architectures for performing arithmetic operations in integrated circuits (“IC”), computer processors and field programmable gate arrays (“FPGA”), and in particular, binary multipliers that are used for performing binary multiplication.
Binary multiplication, or the multiplication of binary numbers, is a critical computational operation in most digital applications. It involves the computation of all partial products that are obtained by multiplying the multiplicand (first number) by each bit of the multiplier (second number), and appropriately combining (shifting and adding) such partial products to obtain the desired product. Consider the desired multiplication of an unsigned binary number X=xm−1 . . . x1x0 of width m with an unsigned binary number Y=yn−1 . . . y1y0 of width n, where xi, yjε{0, 1} for i=0, 1, . . . , (m−1) and j=0, 1, . . . , (n−1). Let Z denote the product of X and Y. In this particular case, X is the multiplicand and Y is the multiplier. Z is now computed as
Z=X×Y=X×(2n−1yn−1+ . . . +21y1+20y0)=2n−1(X×yn−1)+ . . . +21(X×y1)+20(X×y0) Equation (1)
Using two's complement representation for signed binary numbers, the method described in Equation 1 above can also be applied for multiplying signed binary numbers. In this case, the signed product will also be in two's complement form, which is favorable for further signed operations.
However, as the width of the multiplicand and/or the multiplier increases, there is a corresponding increase in the width and/or the number of required partial products, making the method described in paragraph 0003 unsuitable for implementing binary multipliers in arithmetic intensive applications such as signal processing, scientific computations and cryptography.
Due to this reason, considerable attention has been given to computationally efficient binary multiplier architectures that are based on partial product reduction algorithms. For example, see U.S. Pat. No. 5,691,930, U.S. Pat. No. 4,745,570 and U.S. Pat. Appl. No. 20040230631. But as the complexities of such partial product reduction algorithms [see Ref. 1; Ref. 2] increase, so does the irregularity of the architectures based on them, causing such architectures to be less efficient for VLSI implementation.
Divide and conquer algorithms operate by reducing a large problem into a number of smaller problems that are easy to solve. A parameterized divide and conquer algorithm for simultaneous computation of partial sums is described in Ref. 3. That algorithm optimally partitions the desired computation into parts that assume a relatively small number of distinct forms. The redundancy resulting in the repetition of a given form is removed by computing each form only once. The algorithm has been shown to replace D additions required in the direct computation of simultaneous partial sums by O(D/log2 D).
A multi-signal bus architecture (“MSBA”) for finite impulse response (“FIR”) filters based on this algorithm has been demonstrated to achieve significant area savings in comparison to the direct form realization. See Ref. 4 and Ref. 5.
The present invention may be embodied as a VLSI architecture for binary multipliers that is based on the parameterized divide and conquer algorithm introduced in Ref. 3. The architecture consists of two types of basic units, a first type of unit that optimally partitions the computation involved in the multiplication of binary numbers into a set of all possible distinct partial sums and a second type of unit that appropriately combines such partial sums to obtain the desired product. The architecture is parameterized by a partition parameter that is optimized to minimize a desired computational complexity measure such as area or area-time product.
The invention may be embodied as a system for multiplying a binary multiplicand and a binary multiplier to produce a product. Such a system may have a Sigma unit and an Omega unit. In one such system, the Sigma unit generates partial sums of the multiplier and shifted forms of the multiplier. The partial sums are sometimes collectively referred to herein as “p-sums”. The Sigma unit may have a plurality of outputs, each such output being capable of providing one of the p-sums. The Sigma unit may include a plurality of adders.
The Omega unit may have a plurality of control units, a plurality of switch units, and a multi-shifter-adder (“MSA”). Each control unit may have an input related to the multiplicand, and each control unit may have a plurality of outputs connected to a set of the switch units, and each output may be connected to a different one of the switch units in the set. The input related to the multiplicand may be a partition of the multiplicand.
Each switch unit may have a first input, a second input and an output. The first input may be connected to one of the control unit outputs, and the second input may be connected to one of the outputs of the Sigma unit. At least some of the switch units may be configured to provide either one of the p-sums from the Sigma unit or a zero, depending on a signal from the control unit.
The MSA may have a plurality of inputs and an output. Each MSA input may be connected to one of the sets of switch units operated by a particular control unit, and each MSA input may be able to receive one of the p-sums from the Sigma unit or a zero via the switch unit that is selected by the control unit. The output of the MSA may provide the product of the multiplicand and the multiplier. The MSA may have circuitry for performing shift-add operations for combining the p-sums selected by the control units.
In some embodiments of the invention, more than one Omega unit is provided.
The invention may be embodied as a method of multiplying a multiplicand and a multiplier. In one such method, a partition parameter (“r”) is chosen. The multiplicand may be partitioned into a number (“s”) of partitions, where s is an integer number equal to the number (“m”) of binary digits comprising the multiplicand divided by r. Then 2r−1 distinct partial sums of the multiplier and r−1 shifted forms of the multiplier may be generated. The partial sums are sometimes collectively referred to as the “p-sums”. One of the partitions of the multiplicand may be provided to a control unit, and a control substring may be generated. The control substring may correspond to the provided one of the partitions, and the control substring may have 2r bits. The control substring may be used to select one of the p-sums or a zero, and the selected one of the p-sums or zero may be provided to a multi-shifter-adder. This process may be repeated until all partitions of the multiplicand have been used to provide p-sums or a zero to the MSA. The MSA may be used to combine the provided p-sums to produce a product of the multiplicand and the multiplier. Combining the p-sums may be accomplished by using shift-add operations.
For a fuller understanding of the nature and objects of the invention, reference should be made to the accompanying drawings and the subsequent description. Briefly, the drawings are:
The invention may be implemented as a device and/or a method of multiplying a binary multiplicand with a binary multiplier. An embodiment of the invention is a VLSI architecture referred to herein as the Parameterized Binary Multiplier Architecture (“PBMA”). It is based on an existing parameterized divide and conquer algorithm that uses optimal partitioning and redundancy removal for simultaneous computation of partial sums. The PBMA may be implemented to have two types of basic units. The first type of basic unit is referred to herein as the Sigma unit 10, and the second type of basic unit is referred to herein as the Omega unit 20. The Sigma unit 10 may generate distinct partial sums of the multiplier and shifted forms of the multiplier. The partial sums are referred to collectively as “p-sums”.
The Omega unit 20 may combine the partial sums generated by the Sigma unit 10 in order to obtain the product of the multiplicand and the multiplier. The architecture is parameterized by a partition parameter, that is referred to herein as “r”. The partition parameter may be selected so as to minimize a desired computational complexity measure such as area or area-time product.
A central principle of operation for the PBMA is adapted from Ref. 3 and is described below. For reference purposes, “m” is the number of binary digits in the multiplicand (“X”), and “n” is the number of binary digits in the multiplier (“Y”). Since multiplication is commutative, in the multiplication X×Y we can assume that m≧n without imposing any limitation.
In order to implement the invention, initially X is partitioned into a number (“s”) of partitions, where s=┌m/r┐. The partitions may be thought of as short multiplicands of width r. As such, X may be written as:
X=[2s×r−r . . . 2r20]*P*[2r−1 . . . 2120]T Equation (2)
where * indicates matrix multiplication, T denotes the transpose of a matrix and
Since xiε{0, 1}, the s×r matrix P can have at most 2r−1 distinct rows that have at least one non-zero element. Any redundancy due to the repetition of one or more rows in P may be eliminated by expressing P as PX*P1, where PX is a s×(2r−1) matrix with at most one ‘1’ in each row and ‘0’s elsewhere, and P1 is a (2r−1)×r matrix with its Ith row containing the binary digits of integer I as its entries, resulting in:
X=[2s×r−r . . . 2r20]*PX*P1*[2r−1 . . . 2120]T Equation (4)
where P1*[2r−1 . . . 2120]T generates a column of all possible 2r−1 polynomials of degree r−1 in powers of 2, while [2s×r−r . . . 2r0]*PX assigns to each such polynomial all terms in Equation (2) that share it.
Now, the product (“Z”) of the multiplicand and multiplier, Z=X×Y, may be expressed as:
Z=[2s×r−r . . . 2r20]*PX*P1*[2r−1 . . . 2120]T×Y Equation (5)
The PBMA may be thought of as an implementation of Equation (5). The partition size is parameterized by the partition parameter r, which may be selected to minimize a desired computational complexity measure, such as area or area-time product. The Sigma unit 10 of the PBMA may be embodied to implement P1*[2r−1 . . . 2120]T, and the Omega unit 20 may be embodied to implement [2s×r . . . 2r20]*PX.
The Sigma unit 10 may generate 2r−1 distinct partial sums of the multiplier Y and shifted forms of the multiplier 2Y, . . . , 2r−1Y. The partial sums are sometimes referred to herein as Y, 2Y, . . . , (2r−1)Y.
The Omega 20 unit may be thought of as implementing the equation [2s×r−r . . . 2r20]*PX. The Omega unit 20 may include two types of sub-units. A first such type of sub-unit sends either one of the partial sums or a ‘0’ to appropriate nodes of a second such type of sub-unit. The second type of sub-unit then combines the outputs from the first sub-unit to obtain the desired product.
An embodiment of the invention is depicted in
The first type of sub-unit of the Omega unit 20 that performs the sending task may be implemented using a programmable switch matrix (“PSM”) 30. The PSM 30 may be based on the crossbar topology commonly employed in smaller asynchronous transfer mode (“ATM”) networks and field programmable gate arrays (“FPGA”). The PSM may be strictly nonblocking and capable of multicasting. The PSM 30 shown in
By careful inspection, it can be observed that one switch per 2r switches will pass or not pass only the ‘0’, thereby requiring only an NMOS transistor. Therefore, the PSM 30 could be implemented using s×(2r−1) complementary switch elements of type C used to broadcast the partial sums, and s NMOS-only switch elements of an alternate type C′, used to broadcast the ‘0’. However, in a currently preferred embodiment of the present invention, the PSM 30 is realized using only identical C units 302 to maintain the overall modularity of the architecture. Further, since the PSM 30 may be implemented to require only s+2r buses of width n+r, it also compares favorably in metallization area to a multiplexer based selection structure that would require s×2r+2r buses of the same width.
A control algorithm is required to configure the PSM 30. In a currently preferred embodiment of the invention, the s×2r control bits, which are required to turn on or off the appropriate C units 302, are generated from the available m bits of X. One such means of creating the control bits extends X to s×r bits by adding s×r−m ‘0’s to the most significant part of X. Then X is partitioned into s, r-bit partitions, and each such partition is decoded into a 2r-bit control sub-string.
In a currently preferred embodiment of the invention, the algorithm described in the paragraph 0028 may be realized using s control units 304. Each control unit 304 may be functionally identical to a binary decoder and may include r inverters 3004, and 2r, r-input AND gates 3006.
An embodiment of the second type of sub-unit of the Omega unit, 20, which computes the final product, is referred to herein as the multi-shifter-adder (“MSA”) 40. Its operation may be similar to the shift-add operation of a conventional multiplier, except that there are r shifts, instead of one, between any two additions. This functional similarity facilitates implementation of the MSA by allowing the MSA to be based on several existing multiplier architectures, with minor modifications.
In a currently preferred embodiment of the present invention, the MSA 40 is based on the Carry-Save Array Multiplier architecture, and is realized using s×(s−1), r-bit adder units 402, and a final vector-merging adder 404.
An extension of the PBMA for simultaneously performing binary multiplication of a number (“L”) of multiplicands, X(1)=×(1)m−1 . . . ×(1)1×(1)0, X(2)=×(2)m−1 . . . ×(2)1 . . . ×(2)0, . . . , X(L)=×(L)m−1 . . . ×(L)1×(L)0, by a given multiplier, Y=yn−1 . . . y1y0, includes a Sigma unit 10 and L Omega units 20.
For high-speed applications, the Sigma unit 10 and the MSA 40 may be based on faster tree architectures, such as the Wallace Multiplier [Ref. 6] or the Dadda Multiplier [Ref. 7].
For high throughput operation, a pipelined implementation [Ref. 8] of the PBMA is suggested. A reduced version of the PBMA that generates a truncated or rounded product [Ref. 9] could also be desirable in certain signal processing applications.
Although the invention has been described with reference to specific embodiments, the invention is not limited to these embodiments. Rather, other embodiments of the invention may be made without departing from the spirit and scope of the invention. For example, references Ref. 10, Ref. 11, and Ref. 12 describe other embodiments of the invention. Hence, the present invention is deemed limited only by the appended claims and the reasonable interpretation thereof.
The following references are cited in the foregoing text:
This application claims the benefit of priority to U.S. provisional patent application Ser. No. 60/842,496, filed on Sep. 6, 2006.
Number | Date | Country | |
---|---|---|---|
60842496 | Sep 2006 | US |