4.3.12.2.1 DSP Multiply Instructions

The DSP instructions that use the multiplier are summarized in Table 4-4.

Table 4-4. DSP Instructions that Use the Multiplier
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:
  1. DSP instructions using the multiplier can operate in Fractional (1.15/1.31) or Integer modes.

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.