BANDWIDTH EFFICIENT INSTRUCTION-DRIVEN MULTIPLICATION ENGINE
Multiplication engines and multiplication methods are provided for a digital processor. A multiplication engine includes multipliers, each receiving a first operand and a second operand; a local operand register having locations to hold the first operands for respective multipliers; a first operand bus coupled to the local operand register to supply the first operands from a compute register file to the local operand register; a second operand bus coupled to the plurality of multipliers to supply one or more of to the second operands from the compute register file to respective multipliers; and a control unit responsive to a digital processor instruction to supply the first operands from the local operand register to respective multipliers, to supply the second operands from the compute register file to respective multipliers on the second operand bus and to multiply the first operands by the respective second operands in the respective multipliers, wherein one or more of the first operands in the local operand register are reused by the multipliers in two or more multiplication operations.
Latest ANALOG DEVICES TECHNOLOGY Patents:
- Structural electronics wireless sensor nodes
- SUPERCAPACITORS AND OTHER ELECTRODES AND METHODS FOR MAKING AND USING SAME
- Broadband microwave variable gain up-converter
- Ultra low-voltage circuit and method for nanopower boost regulator
- COMBINATION OF A BATTERY STACK AND A BATTERY MONITOR, AND A METHOD OF CONNECTING A BATTERY MONITOR TO A STACK OF BATTERIES
This application claims priority based on Provisional Application Ser. No. 60/879,760, filed Jan. 10, 2007, which is hereby incorporated by reference in its entirety.
FIELD OF THE INVENTIONThis invention relates to digital signal processors and, more particularly, to a software programmable complex multiplication engine.
BACKGROUND OF THE INVENTIONAdvanced wireless networks require significant hardware acceleration in order to perform functions such as beamforming and path searching. To address these data processing requirements, CDMA systems often implement these algorithms directly with a dedicated ASIC or an on-chip coprocessor unit. Although this approach offers the highest potential performance, it carries significant design risks and is very inflexible to changes in standards and algorithms.
These and other algorithms usually involve multiplication operations. One of the limiting factors in a high performance multiplication engine is the rate at which data can be supplied to the engine from a register file or a memory. The speed and width of data buses can be increased, but at the expense of chip area and power dissipation. A further factor is that data is often reused in digital signal processing algorithms, such as FIR digital filters.
Accordingly, there is a need for improved multiplication engines and multiplication methods.
SUMMARY OF THE INVENTIONAccording to a first aspect of the invention, a multiplication engine is provided for a digital processor. The multiplication engine comprises a plurality of multipliers, each receiving a first operand and a second operand; a local operand register having a plurality of locations to hold the first operands for respective ones of the multipliers; a first operand bus coupled to the local operand register to supply the first operands from a compute register file to the local operand register; a second operand bus coupled to the plurality of multipliers to supply one or more of the second operands from the compute register file to respective ones of the multipliers; and a control unit responsive to a digital processor instruction to supply the first operands from the local operand register to respective ones of the multipliers, to supply the second operands from the compute register file to respective ones of the multipliers on the second operand bus and to multiply the first operands by the respective second operands in the respective multipliers, wherein one or more of the first operands in the local operand register are reused by the plurality of multipliers in two or more multiplication operations.
According to a second aspect of the invention, a method is provided for performing multiplication in a digital processor. The method comprises providing a plurality of multipliers; providing a local operand register having a plurality of locations to hold first operands for respective ones of the multipliers; supplying the first operands from a compute register file to the local operand register on a first operand bus; supplying second operands from the compute register file to respective ones of the multipliers on a second operand bus; controlling operation of the multipliers and the local operand register in response to a digital processor instruction by supplying the first operands from the local operand register to respective ones of the multipliers, supplying the second operands from the compute register file to respective ones of the multipliers on the second operand bus and multiplying the first operands by the respective second operands in respective ones of the multipliers; and reusing one or more of the first operands in the local operand register in two or more multiplication operations by the plurality of multipliers.
According to a third aspect of the invention, a multiplication engine is provided for a digital processor. The multiplication engine comprises a multiplier circuit, a register file to supply data to the multiplier circuit, the register file including a plurality of register locations in a shift configuration, and a control circuit to load data from a data source into the is register file and to shift data in the register file after a multiply instruction is executed, wherein data in the register file is used by two or more multiply instructions.
According to a fourth aspect of the invention, a method is provided for digital processing in a multiplication engine including a multiplier circuit and a register file to supply data to the multiplier circuit. The method comprises loading data from a data source into the register file, executing a first multiply instruction using data in the register file, shifting data in the register file from current register locations to next register locations after execution of the first multiply instruction, and executing a second multiply instruction using the shifted data in the register file.
For a better understanding of the present invention, reference is made to the accompanying drawings, which are incorporated herein by reference and in which:
A block diagram of an example of a digital signal processor (DSP) 10 suitable for incorporation of the present invention is shown in
An example of compute blocks 12 and 14 is shown in
A multiplication engine 100 in accordance with an embodiment of the invention is shown in
Multiplication engine 100 receives operands from compute register file 50 (
Each of the multiplier units 110, 112, . . . 118 can be configured in response to an instruction being executed. In one configuration, each of the multiplier units is configured as eight multipliers of 16 bits by 2 bits. In another configuration, each of the multiplier units is configured as a single multiplier of 16 bits by 16 bits.
Local operand register 130 provides local storage of operands used by multiplier units 110, 112, . . . 118. Local operand register 130 is useful where operands are reused by the multiplier units for two or more calculations. In some configurations, the same operands are used for two or more consecutive computations by the same multiplier units. In other configurations, operands are reused by different multiplier units for consecutive computations and the operands in local operand register 130 are shifted after completion of a computation. By holding operands that are reused in local operand register 130, transfer of data on operand buses 190 and 192 is reduced and operating efficiency is increased.
As shown in
In the embodiment of
In the embodiment of
The multiplication engine can be used to execute an FIR filter instruction as follows.
TRsh+=Rms**THRo, THR7h=Rss (j)(clr)(sho)(mhl))(shl)
Where:
-
- Rms—is an input single short coefficient.
- THRo—is an octal register data—inhabits 16 data numbers.
- THR7h—is the msb short in the THR7:0 registers.
- Rss—is a short operand which is loaded into the msb THR.
- j—for conjugate multiplication option.
- clr—clears the TR accumulators.
- sho—for real 8 bit multiplications.
- mhl—high/low Rms
- shl—high/low Rss
The instruction makes 16 complex multiplications and afterwards shifts the contents of local operand register 130 (THR 7:0) by 16 bits to the right and updates the THR7h location by the new short word data from the compute register file.
Example (from
-
- Step1: TR15:0=c0**[d15 . . . d0]=c0**d15, c0**d14, c0**d13, . . . , c0**d3, c0**d2, c0**d1, c0**d0
The data d15:d0 is stored in the THR7:0 (each data number is 16b only). The coefficient c0 is being loaded by Rms and multiplied by all the data numbers. Then the data in the THR is shifted to the right and d16 is loaded to the THR7h. Thus, the data in the THR7:0 inhabits data numbers d16:d1 and is ready for step 2.
FIR Calc. 16 Taps
The multiplication engine can be used to execute a matrix instruction (broadcast) as follows.
-
- 1) TRsh+=Rmd**Rnd (j)(clr)(sho)(f)
- 2) TRsh+=Rmd**THRd (j)(clr)(sho)(f)
- 3) TRsh+=Rmq**Rn (j)(clr)(sho)(f)
- 4) TRsh+=Rmq**THR (j)(clr)(sho)(f)
- 5) TRsh+=(Rmq,Rnq)**THRs (j)(clr)(sho)(f)(ns)
-
- Rmd—holds 4 data numbers, in total 64 bits operand.
- Rnd,THRd—holds 4 coefficients numbers, in total 64 bits operand.
From
That means that in order to calculate matrix A we don't need to load 16 data numbers and 16 coefficients and then to multiply them, but we can bring only 4 data numbers and 4 coefficients and multiply each of the data numbers by each of the coefficients to accept the dot product. That method utilizes all the 16 multipliers and saves bus bandwidth.
General Matrix Calc. 4*([4*4]**[4*4])—Continuous Matrix Calculation.
Having thus described several aspects of at least one embodiment of this invention, it is to be appreciated various alterations, modifications, and improvements will readily occur to those skilled in the art. Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and scope of the invention. Accordingly, the foregoing description and drawings are by way of example only.
Claims
1-17. (canceled)
18. A digital processor for performing a finite impulse response (FIR) filter operation on data numbers comprising:
- a plurality of multipliers, each receiving a first operand and a second operand, wherein the first operands correspond to the data numbers, and the second operands correspond to coefficients for the FIR filter operation;
- a local operand register having a plurality of locations to hold the first operands corresponding to a subset of the data numbers for the plurality of multipliers, wherein the plurality of locations correspond to respective ones of the multipliers;
- a control unit responsive to a digital processor instruction to supply the first operands from the plurality of locations the local operand register to respective ones of the multipliers, to supply the second operands from a compute register file to respective ones of the multipliers and to multiply the first operands by the respective second operands in the respective multipliers,
- wherein the control unit, upon detecting a first multiplication operation being executed by a first multiplier: (1) causes the first operands corresponding to the subset of the data numbers to shift in the local operand register by a number of bits equal to a width of the first operands to respective next locations in the plurality of locations of the local operand register; (2) if available, loads a next data number from the compute register file to the local operand register; and (3) supplies the shifted first operands and the next data number to the plurality of multipliers, thereby causing one or more of the first operands in the local operand register used by the first multiplier in the first multiplication operation to be reused by the at least one subsequent multiplier in at least one subsequent multiplication operation, and enabling two or more multiply instructions to be executed without reloading the local operand register with a complete set of new operands after each multiplication operation.
19. The digital processor of claim 18, wherein the compute register file stores the data numbers and the coefficients for the FIR filter operation.
20. The digital processor of claim 19, further comprising:
- a first operand bus coupled to the local operand register to supply the first operands corresponding to the subset of data numbers from the compute register file to the local operand register.
21. The digital processor of claim 19, further comprising:
- a second operand bus coupled to the plurality of multipliers to supply the second operands corresponding to one of the coefficients for the FIR filter operation from the compute register file to each of the multipliers.
22. The digital processor of claim 18, wherein a number of taps for the FIR filter correspond to a number of the plurality of multipliers used in the multiplication operation.
23. The digital processor of claim 18, wherein each successive multiplication operations multiplies a shifted window of data numbers with one of the coefficients for the FIR filter.
24. The digital processor of claim 18, wherein the first operands corresponding to the subset of the data numbers shift to the right by the number of bits equal to the number of bits for each data number, and the next data number is loaded to a most significant bit location of the local operand register.
25. The digital processor of claim 21, wherein the second operand bus is configured to broadcast one of the coefficients of the FIR filter from the compute register file to each of the multipliers.
26. The digital processor of claim 21, wherein the control unit, upon detecting the first multiplication operation being executed, further causes the second operand bus to broadcast a next one of the coefficients of the FIR filter from the compute register file to each of the multipliers.
27. The digital processor for claim 18, wherein each of the first operands comprises a data number having 16-bits.
28. The digital processor for claim 27, wherein the data number comprises 16 bits and the data number is a complex number having 8-bits real and 8-bits imaginary.
29. The digital processor for claim 27, wherein the first operands corresponding to the subset of the data numbers shift by 16-bits to the right in the local operand register respective next locations in the plurality of locations of the local operand register.
30. A method for performing in a digital processor a finite impulse response (FIR) filter operation on data numbers, comprising:
- loading first operands for a plurality of multipliers from a compute register file to a plurality of locations in a local operand register using a first operand bus, wherein a plurality of locations are configured to hold the first operands for respective ones of the multipliers, and the first operands stored in the local operand register correspond to a subset of the data numbers,
- supplying second operands for the plurality of multipliers from the compute register file to respective ones of the plurality of multipliers using a second operand bus, wherein the second operands correspond to coefficients for the FIR filter operation;
- controlling operation of the multipliers and the local operand register in response to a digital processor instruction by supplying the first operands corresponding to the subset of the data numbers from the plurality of locations of the local operand register to respective ones of the multipliers, supplying the second operands from the compute register file to respective ones of the multipliers on the second operand bus and multiplying the first operands by the respective second operands in respective ones of the multipliers;
- shifting the local operand register corresponding to the subset of the data numbers a number of bits equal to a width of the first operands to respective next locations in the plurality of locations of the local operand register upon detecting a first multiplication operation being executed by a first multiplier;
- loading if available, a next data number to the local operand register; and
- supplying the shifted first operands and the next data number to the plurality of multipliers, thereby causing one or more of the first operands in the local operand register used by the first multiplier in the first multiplication operation to be reused by the at least one subsequent multiplier in at least one subsequent multiplication operation and enabling two or more multiply instructions to be executed without reloading the local operand register with a complete set of new operands after each multiplication operation.
31. The method of claim 30, wherein the steps for shifting the local operand register corresponding to the subset of data numbers causes successive multiplication operations to multiply a shifted window of data numbers with one of the coefficients for the FIR filter.
32. The method of claim 30, wherein the first operands corresponding to the subset of the data numbers in the local operand register are shifted to the right by the width of each data number, and the next data number is loaded to a most significant bit location of the local operand register.
33. The method of claim 30, wherein the second operand bus is configured to broadcast one of the coefficients of the FIR filter from the compute register file to each of the multipliers.
34. The method of claim 30, wherein the controlling operation of the multipliers comprises broadcasting a next one of the coefficients of the FIR filter from the compute register file to each of the multipliers in response to the digital processor instruction.
35. The method of claim 30, wherein each of the first operands comprises a data number having 16-bits.
36. The method of claim 35, wherein the data number comprises 16 bits and the data number is a complex number having 8-bits real and 8-bits imaginary.
37. The method of claim 35, wherein the first operands corresponding to the subset of the data numbers in the local operand register are shifted by 16-bits to the right in the local operand register respective next locations in the plurality of locations of the local operand register.
Type: Application
Filed: Oct 16, 2013
Publication Date: Mar 13, 2014
Applicant: ANALOG DEVICES TECHNOLOGY (Hamilton)
Inventors: Andreas D. Olofsson (Lexington, MA), Baruch Yanovitch (Ra'anana)
Application Number: 14/055,177