Digital multiplication and accumulation system

Abstract: A multiplication system performs a series of multiplications and accumulations of plural pairs of first and second operands. The system includes first and second buses, a memory for storing the plural pairs of first and second operands, and a read buffer coupled to the memory for sequentially reading the first and second operands. An accumulator coupled to the first bus receives the first operands from the read buffer and stores the first operands. A multiplier, coupled to the first and second buses, receives the first and second operands in parallel over the first and second buses respectively from the accumulator and the read buffer respectively to provide a series of products. The system further includes an accumulator for accumulating the products to provide a final accumulated product.

Description: The present invention generally relates to an improved digital multiplication system. The present invention more particularly relates to such a system for efficiently performing a series of multiplications of plural pairs of first and second operands to derive a series of multiplication products. The present invention is still further directed to such a system capable of accumulating the multiplication products and which performs the multiplications and accumulations in fewer operating cycles than heretofore possible. Digital multiplication and accumulation are often required of digital signal processors for many applications. One such application is in the implementation of Recommendation G.721 for use in cordless portable telephony. One function required in Recommendation G.721 is the performance of eight serial multiplications of eight different pairs of first and second multiple-bit binary operands and the accumulation of the multiplication products. In addition, Recommendation G.721 requires, to perform this function, one set of operands to be in floating point format, the second set of operands to be in fixed point format, and the accumulated product to be in fixed point format. Digital signal processors generally are in integrated circuit form for such an application and are powered by portable power sources such as a battery. It is therefore advantageous for such digital signal processors to perform their required functions in a minimum number of operating cycles to conserve battery power. Unfortunately, prior art digital signal processors generally require a great number of operating cycles to perform this serial multiplication and accumulation required by Recommendation G.721. For example, one digital signal processor required 396 operating cycles, another digital signal processor required 354 cycles, and still another digital signal processor requires 122 operating cycles to perform this G.721 function. Obviously, any reduction in the number of operating cycles to perform this G.721 function would represent an advantage in conserving battery power. GB-A-2,218,548 discloses a digital multiplication system for performing a multiplication of first and second operands, the system comprising a memory for storing the first and second operands, read means coupled to the memory for sequentially reading the first and second operands, storage means for temporarily storing the first operand read out from the memory, and multiplier means for multiplying the first and second operands, the multiplier means receiving the first operand from the storage means on a first bus and the second operand read out from the memory on a second bus. According to the present invention, such a system is adapted for performing serial multiplication of pairs of first and second operands and accumulating the multiplication products, the system being characterised in that the storage means is coupled to the first and second buses via respective transfer gates, and that control means control the gates such that in one operating cycle the storage means is coupled to the first bus and holds a first operand while a second operand is read out from the memory, and in a subsequent operating cycle the storage means is coupled to the first and second buses and receives from a summing means the sum of the product of the multiplier means and the accumulated product sum of previous multiplications performed by the multiplier means. Preferably, the product sum stored in the storage means is transferred to a register coupled to the first bus, and the contents of the register are then summed in the summing means with the next product from the multiplier. In one embodiment of the invention, the first operand is a floating point binary number, the second operand is a fixed point binary number, and the multiplier means includes means for converting the second operand fixed binary point number to a second operand floating point binary number during an operating cycle in which the multiplier means receives the second operand from a read buffer coupled to the memory. The multiplication system described herein may be utilized to advantage in a digital signal processor for performing the aforementioned multiplication and accumulation function required by Recommendation G.721. It requires just 31 operating cycles to complete the required function representing a considerable savings in execution time and battery power. In addition, the multiplication system is structured in a pipelined arrangement so that not only is the required number of operating cycles reduced, but in addition, the sections of the multiplication and accumulation system not currently active may be powered down to further conserve power. Further, all of the operands may be stored in a single memory. In the accompanying drawing, by way of example only, the sole figure is a schematic circuit diagram of a multiplication and accumulation system embodying the present invention which may be utilized to advantage in a digital signal processor. Referring now to the sole figure, it illustrates a multiplication and accumulation system 10 embodying the present invention. The system 10 generally includes an arithmetic logic unit 12, a multiplying means 14, a memory 20, and first and second buses 16 and 18 in common with arithmetic logic unit 12 and multiplying means 14. The arithmetic logic unit 12 includes a read buffer 22, a write buffer 24, a unidirectional shift register 26, a summer 28, an accumulator 30, a temporary buffer 32, and a test register 34. The multiplying means 14 includes a first converting means section 36, a multiplier section 38, and a second converting means section 40. The memory 20 preferably comprises a random access memory which is arranged to store the operands to be utilized in the serial multiplication and accumulation process performed by the system 10. To that end, the memory 12 stores the first set of operands comprising the first operands and the second set of operands comprising the second operands. The first operands are multiple-bit binary floating point numbers and the second operands are multiple-bit binary fixed point numbers. The read buffer 22 is coupled to the memory 20 and to the first and second buses 16 and 18 through transfer gates 42 and 44 respectively. The transfer gates 42 and 44 preferably take the form of CMOS transfer gates of the type well known in the art which, when activated, provide a low impedance path, and which, when turned off, provide a high impedance or isolation. The transfer gates 42 and 44 thus provide access to the first and second buses 16 and 18 respectively to the read buffer 22. Other such transfer gates will be referred to hereinafter as simply transfer gates. The write buffer 24 is coupled to the memory 20 and to the first and second buses 16 and 18 respectively by transfer gates 46 and 48 respectively. As will be seen hereinafter in accordance with this preferred embodiment, the write buffer 24 serves to write the first set of operands back to the memory 20 at locations which are incremented by one increment. The unidirectional shift register 26 is coupled to the first bus 16 through a transfer gate 50 and to a source of shift data (not shown) which is received at an input 52. In accordance with this preferred embodiment, the unidirectional shift register 26 is not called upon to shift data which it receives but is illustrated for purposes of completeness. The summer 28 is coupled to the unidirectional shift register 26 and to the second bus 18 through a transfer gate 54. As will be seen hereinafter, the summer 28 receives the first operands from bus 16 and transfers the first operands to the accumulator 30. The summer 28 also adds the products provided by the multiplying means 14 in a manner to be described hereinafter and provides the sum of the products to the accumulator 30. The accumulator 30 is coupled to the summer 28 by transfer gate 55 and to the first bus 16 through a transfer gate 56. As will be seen hereinafter, the accumulator 30 serves as a storing means for storing the first operands and the product sums provided by the summer 28. The temporary buffer 32 is coupled between the output of the summer 28 by a transfer gate 58 and to the second bus 18 through a transfer gate 60. The temporary buffer 32 in accordance with this preferred embodiment is utilized for storing the first operand of the second set of operands which is placed into the temporary buffer 32 by a previous digital signal processor operation. The test register 34 has an input 62 coupled to the first bus 16 by a transfer gate 64 and an output 66 which is coupled to the first bus 16 by another transfer gate 68. As will be seen hereinafter, in accordance with this preferred embodiment, the test register 34 forms a register means for storing the product sums as the system 10 performs the serial multiplications and accumulates. As previously mentioned the multiplying means 14 comprises three sections, the first section being a first converting means 36, the second section being a multiplier 38, and the third section being a second converting means 40. As illustrated in the figure, the first converting means 36 is operable during the first cycle of a multiplication, the multiplier 38 is operable during the second cycle of a multiplication, and the second converting means 40 is operable during the third cycle of a multiplication. Each of these cycles corresponds to an operating cycle of the system 10. The first converting means 36 converts the second fixed point operands to second floating point operands. This is required because the multiplier 38 is configured for multiplying a pair of floating point operands. In accordance with techniques well known in the art, the first converting means 36 includes a convert to magnitude section 70, a number of leading zeros section 72, and a left shifter 74. These elements, in a manner well known in the art, convert the second operands from a fixed point format to a floating point format for the multiplier 38. The multiplier 38 comprises a 16-bit by 8-bit floating point signed magnitude multiplier of the type well known in art. It includes a first input 76 for receiving the first operands and second input 78 for receiving the second operands which have been converted to floating point format by the first converting means 36. The multiplier 38 multiplies the multiple-bit mantissas of the operands and provides a floating point product at its output 80. The multiplier further includes an adder 82 and a subtractor 84 for combining the multiple-bit exponents of the first and second operands to provide a combined exponent at an output 86. The second converting means 40 converts the floating point products provided by the multiplier 38 at its output 80 to fixed point products at an output 88. The second converting means 40 includes an adder 90, a convert to two's compliment 92, and a left and right shifter 94. The adder 90 rounds the multiple-bit floating point products by three bits and provides the rounded floating point products to the convert to two's compliment at an input 96. The convert to two's compliment 92 and left and right shifter 94 under the control of a shift decoder 98 convert the floating point products to fixed point products in a known manner. The resulting fixed point products are latched in a latch 100. When the fixed point products are latched in latch 100, they are available to the second bus 18 for accumulation in a manner to be described hereinafter. As will be appreciated by those skilled in the art, the operation of the system 10 is performed during discrete and successive operating cycles pursuant to operating instructions obtained from an instruction memory, such as an instruction read only memory (not shown). The operation of the system 10 will be described hereinafter with respect to each operating cycle for multiplying and accumulating four pairs of first and second multiple-bit binary operands. The first operands (DQ i ) wherein i is equal to 0 to 3, are originally in floating point format and the second operands (B n ), wherein n is equal to 1 through 4, are originally in fixed point format. In the first operating cycle, the first operand of the first act of operands, DQ 0 is read from the memory 20 and stored in the read buffer 22. In the second operating cycle, operand DQ 0 is transferred from the read buffer 22 to the accumulator 30 and to the write buffer 24. This is accomplished by the read buffer 22 driving the first bus 16 to transfer DQ 0 to the summer 28 through the unidirectional shift register 26. The A bus is driven with all zeros so that the output of the summer 28 is the value of DQ 0 which is stored in the accumulator 30. The operand DQ 0 is transferred to the write buffer 24 also over the first bus 16 to prepare the write buffer 24 for transferring operand DQ 0 back to the memory 20 into data location DQ 1 for updating the memory 20. Also during the second operating cycle, the first operand of the second set of operands (B 1 ) is transferred from the memory 20 into the read buffer 22. With the first operand of the first set of operands (DQ 0 ) being in the accumulator 30 and the first operand of the second set of operands (B 1 ) being in the read buffer 22, the first multiply can begin in the multiplier 14 with the accumulator 30 driving the first bus 16 with the value of DQ 0 and the read buffer driving the second bus 18 with the value of B 1 . The first multiply begins during the third operating cycle with the first converting means 36 converting B 1 from the fixed point format to the floating point format. In the fourth operating cycle the second operand DQ 1 of the first set of operands is read from the memory 20 into the read buffer 22. Also during the fourth cycle, the second cycle of the first multiply is performed by the multiplier 38 multiplying the first pair of operands DQ 0 and B 1 . During the fifth operating cycle, DQ 0 is transferred from the write buffer 24 to the memory 20 and is stored therein at memory location DQ 1 . Also during the fifth cycle, the third cycle of the first multiply is performed by the second converting means 40 which converts the floating point product of DQ 0 and B 1 to fixed point format and stores the first product in the latch 100. During the sixth operating cycle, the next or second operand DQ 1 of the first set of operands is transferred from the read buffer 22 to the accumulator 30 over bus 16 and through the unidirectional shift register 26 and the summer 28 in the same manner as previously described with respect to the transference of DQ 0 from the read buffer 22 to the accumulator 30. Also, DQ 1 is transferred from the read buffer to the write buffer. In addition, during the sixth operating cycle, the next or second operand B 2 of the second set of operands is read from the memory 20 and stored in the read buffer 22. During the seventh operating cycle, the second multiply begins. The accumulator 30 drives the first bus 16 with the value of DQ 1 and the read buffer 22 drives the second bus 18 with the value of B 2 . During the seventh operating cycle, B 2 is converted to floating point format by the first converting means 36 of the multiplying means 14. During the eighth operating cycle, the first multiply product is accumulated with the contents of the test register 34. This is accomplished by the latch 100 driving the second bus 18 with the value of the first multiply product which is received by the summer 28. The contents of the test register 34, which at this time is assumed to be all zeros, is driven onto bus 16 through the unidirectional shift register 26 to the summer 28 where it is added to the first multiply product. The first product sum is then stored in the accumulator 30. Also during the eighth operating cycle, the third operand DQ 2 of the first set of operands is read from memory 20 and transferred to the read buffer 22. The second multiply proceeds through its second cycle in the multiplying means 14 with B 2 and DQ 1 being multiplied in the multiplier 38. In the ninth operating cycle, the first accumulated product is transferred from the accumulator 30 to the test register 34 over the first bus 16. Also during this ninth operating cycle, DQ 1 is transferred from the write buffer 24 to the memory 20 and stored therein at storage location DQ 2 . Lastly, during this ninth operating cycle, the second multiply completes the third multiply cycle by the second product resulting from the multiplication of B 2 and DQ 1 being converted from the floating point format to the fixed point format in the second converting means 40 and is stored in the latch 100. During the tenth operating cycle, DQ 2 is transferred from the read buffer 22 to the accumulator 30 in the manner as previously described and to the write buffer 24. Also, the third operand B 3 of the second set of operands is read from the memory 20 and transferred to the read buffer 22. In the eleventh operating cycle, the third multiply begins with the accumulator 30 driving bus 16 with the value of DQ 2 and the read buffer 22 driving bus 18 with the value of B 3 . During this eleventh operating cycle, B 3 is converted from the fixed point format to the floating point format by the first converting means 36. During the twelfth operating cycle, the second multiply products stored in latch 100 is accumulated with the first product sum which is stored in the test register 34. This is accomplished by the latch 100 driving bus 18 with the value of the second product (DQ 1 x B 2 ) and the test register 34 driving bus 16 with its contents which at this time is the first product (DQ 0 x B 1 ). The summer 28 adds the contents of the test register 34 and the second product received from latch 100 to provide a second accumulated product and stores the second accumulated product in the accumulator 30. Also during the twelfth operating cycle, the next and last operand DQ 3 of the first set of operands is read from memory 20 and stored in the read buffer 22. Lastly, during this twelfth operating cycle, the third multiply is in its second cycle with the multiplication of B 3 and DQ 2 in the multiplier 38. In the thirteenth operating cycle, the second accumulated product within the accumulator 30 is transferred to the test register 34 over the first bus 16. Also, DQ 2 is transferred from the write buffer 24 to the memory 20 wherein it is stored at storage location DQ 3 . Lastly, the third multiply completes its third cycle with the product of B 3 and DQ 2 being converted from the floating point format to the fixed point format in the second converting means 40 to provide a third product which is stored in the latch 100. During the fourteenth operating cycle, DQ 3 is transferred from the read buffer 22 to the accumulator 30 over the first bus 16 and through the unidirectional shift register 26 and the summer 28. Also, DQ 3 is also read off of the first bus 16 and stored in the write buffer 24. To complete the fourteenth operating cycle, the last operand B 4 of the second set of operands is read from the memory 20 and stored in the read buffer 22. In the fifteenth operating cycle, the fourth multiply begins. The accumulator 30 drives bus 16 with the value of DQ 3 and the read buffer 22 drives the bus 18 with the value of B 4 . Then, B 4 is converted from the fixed point format to the floating point format by the first converting means 36 to complete the first cycle of the fourth multiply. In the sixteenth operating cycle, the third product resulting from the multiplication of B 3 and DQ 2 is accumulated with the second accumulated product stored in the test register 34. This is accomplished as described before with the latch 100 driving bus 18 with the value of the third product and the test register 34 driving the bus 16 with its contents which is now the accumulation of the first and second multiplication products. The summer 28 sums the second accumulated product with the third multiplication product to provide a third accumulated product which is stored in the accumulator 30. Also during the sixteenth operating cycle, the fourth multiply completes its second cycle with the multiplication of B 4 and DQ 3 in the multiplier 38. In the seventeenth operating cycle, DQ 3 is transferred from the write buffer 24 to the memory 20 where it is stored therein at storage location DQ 4 . Also, during the seventeenth cycle, the fourth multiply completes with the fourth multiplication product resulting from the multiplication of B 4 and DQ 3 being converted from the floating point format to the fixed point format by the second converting means 40. The fourth product is then stored in the latch 100. In the last and eighteenth operating cycle, the fourth product stored in the latch 100 is accumulated with the third accumulated product which currently resides in the accumulator 30. The accumulator 30 drives bus 16 with the third accumulated product and the latch 100 drives the bus 18 with the fourth multiplication product. The summer 28 adds the third accumulated product to the fourth multiplication product to provide a final accumulated product which is stored in the accumulator 30 and is ready for further processing. As can be seen from the foregoing, the operation of the system 10 described above completes four multiplies and accumulates in eighteen operating cycles. After the completion of the sixth operating cycle, the operation of the system 10 repeats every four cycles with cycles 7 through 10 being identical to cycles 11 through 15. If the foregoing procedure were utilized to perform eight multiplies and accumulates, it would require 34 operating cycles to complete. If the first set of operands, namely, DQ 0 and B 1 are available from other operations, DQ 0 could first be stored in the accumulator 30 and B 1 could first be stored in the temporary buffer 32. This would negate the need to read these operands out of the memory 20 to economize on the number of operating cycles required. For example, if DQ 0 is stored in accumulator 30 and B 1 is stored in the temporary buffer 32 before the multiplies and accumulates begin, eight multiplies and accumulates can be achieved in just 31 operating cycles. This number of operating cycles is but a fraction of the number of operating cycles previously required in the prior art to accomplish the eight multiplications and accumulates required by the previously mentioned Recommendation G.721. This results in considerable conservation of a portable depletable power source such as a battery. In addition, it will be noted that during a number of operating cycles, either the arithmetic logic unit 12 or multiplying means 14 or both are not required to perform an operation. During those operating cycles when either the arithmetic logic unit 12 or multiplying means 14 is not needed, they could be de-energized to further conserve on power.

Claims: A digital multiplication and accumulation system for performing serial multiplication of pairs of first and second operands and accumulating the multiplication products, the system comprising: a memory (20) for storing the first and second operands, read means (22) coupled to the memory (20) for sequentially reading the first and second operands, storage means (30) for temporarily storing the first operand read out from the memory (20), and multiplier means (14) for multiplying the first and second operands, the multiplier means receiving the first operand from the storage means (30) on a first bus (16) and the second operand read out from the memory (20) on a second bus (18), characterised in that the storage means (30) is coupled to the first and second buses (16, 18) via respective transfer gates (50, 54), and that control means control the gates such that in one operating cycle the storage means (30) is coupled to the first bus and holds the first operand while the second operand is read out from the memory (20), and in a subsequent operating cycle the storage means (30) is coupled to the first and second buses and receives from a summing means (28) the sum of the product of the multiplier means (14) and the accumulated product sum of previous multiplications performed by the multiplier means (14). A system according to claim 1 comprising means for transferring the accumulated product sum stored in the storage means (30) to a register (34) coupled to the first bus (16), and means for summing the contents of the register (34) with the next product from the multiplier means (14) in the summing means (28). A system according to claim 2 in which the read means comprises read buffer means (22) coupled to the memory (20) and to the first and second bus (16, 18) for reading the first operand from the memory means during a first operating cycle and reading the second operand from the memory during a second operating cycle, the storage means (30) receiving the first operand from the read buffer means (22) during the second operating cycle as the read buffer means reads the second operand from the memory (20). A system according to claim 3 in which the multiplier means (14) receives the second operand from the read buffer means (22) over the second bus during a third operating cycle. A system as defined in claim 4 wherein the first operand is a floating point binary number, wherein the second operand is a fixed point binary number, and wherein the multiplier means (14) includes first conversion means (36) for converting the second operand fixed point binary number to a second operand floating point binary number during the third operating cycle. A system as defined in claim 5 wherein the memory (20) holds a plurality of pairs of the floating and fixed point binary numbers the floating point numbers forming a first set of operands and the fixed point numbers forming a second set of operands, and wherein the multiplier means (14) includes a multiplier (38) for multiplying the first operand and the converted second operand during a fourth operating cycle to provide a first binary floating point product, and wherein the read buffer means (22) reads a third operand from the first set of operands stored in the memory means (20) during the fourth operating cycle. A system as defined in claim 6 wherein the multiplier means (14) includes second conversion means (40) for converting the first binary floating point product to a first fixed point product during a fifth operating cycle. A system as defined in claim 7 wherein the storage means (30) receives the third operand from the read buffer means (22) over the first bus during a sixth operating cycle and wherein the read buffer means (22) reads a fourth operand from the second set of operands stored in the memory (20) during the sixth operating cycle. A system as defined in claim 8 wherein the multiplier means (14) receives the third operand from the storage means (30) over the first bus and the fourth operand from the read buffer means (22) over the second bus during a seventh operating cycle. A system as defined in claim 9 wherein the first conversion means (36) converts the fourth operand from a fourth operand fixed point binary number to a fourth operand floating point binary number during the seventh operating cycle. A system as defined in claim 10 wherein the storing means (30) is coupled to the second bus (18) for receiving the first fixed point product from the multiplier means (14) during an eighth operating cycle and wherein the multiplier (38) multiplies the third and fourth operand floating point binary numbers during the eighth operating cycle to provide a second binary floating point product. A system as defined in claim 11 wherein the register (34) is coupled to the first bus (16) for receiving the first fixed point product from the storage means (30) over the first bus during a ninth operating cycle and wherein the second conversion means (40) converts the second binary floating point product to a second fixed point product during the ninth operating cycle. A system as defined in claim 12 wherein the storage means (30) receives the second fixed point product from the multiplier means (14) during a tenth operating cycle. A system as defined in claim 13 wherein the register (34) receives the second fixed point product from the storage means (30) over the first bus during an eleventh operating cycle. A system as defined in claim 14 wherein the summing means (28) is coupled to the first and second buses (16, 18) for receiving the first fixed point product from the register means (34) over the first bus (16) and the second fixed point product over the second bus (18) from the multiplier means (14). and in which the output of the summing means (28) is transferred to the storage means (30) during a twelfth operating cycle. A system as defined in claim 15 further including write buffer means (24) coupled to the memory (20) and to the first bus (16) for receiving the first and third operands during the second and sixth operating cycles respectively over the first bus (16) and conveying the first and third operands to the memory (20) during the fifth and ninth operating cycles respectively. A system as defined in any one of the preceding claims wherein the storage means (30) comprises an accumulator.

Inventors: BARTKOWIAK JOHN G, NIX MICHAEL A, BARTKOWIAK, JOHN G., NIX, MICHAEL A.
Applicants: ADVANCED MICRO DEVICES INC, ADVANCED MICRO DEVICES, INC.
Application year: 1992
Main classification: G06F7
IPC codes: G06F7, G06F17