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