3.3.12.2.1 DSP Multiply Instructions
The DSP instructions that use the multiplier are summarized in Table 3-4.
| DSP Instruction(1) |
Description |
Algebraic Equivalent |
|---|---|---|
|
MAC |
Multiply and Add to Accumulator or Square and Add to Accumulator |
a = a + b * c or a = a + b2 |
|
MSC |
Multiply and Subtract from Accumulator |
a = a – b * c |
|
MPY |
Multiply |
a = b * c |
|
MPY.N |
Multiply and Negate Result |
a = -b * c |
|
SQR | Square to Accumulator |
a = b2 |
|
SQRAC | Square and Accumulate |
a = a + (b2) |
|
ED |
Partial Euclidean Distance |
a = (b – c)2 |
|
EDAC |
Add Partial Euclidean Distance to the Accumulator |
a = a + (b – c)2 |
|
Note:
| ||
The DSP Multiplier Unsigned/Signed Control (US bit (CORCON[12])) determines whether the
DSP multiply instructions are signed (default), unsigned or mixed-sign. The US[1:0] bit
does not influence the MCU multiply instructions, which have specific instructions for a
signed or unsigned operation. If US = 1, the input operands for
instructions shown in Table 3-4 are considered
as unsigned values, which are always zero-extended into the 33rd bit of the multiplier
value. If the US = 0, the operands are sign-extended.
