Multiply-accumulate unit (MAC) UM0404
82/564 DocID13284 Rev 2
4 Multiply-accumulate unit (MAC)
The MAC is a specialized co-processor added to the ST10F276 CPU core to improve the
performance of signal processing algorithms. It includes:
• A multiply-accumulate unit.
• An address generation unit, able to feed the MAC unit with 2 operands per cycle.
• A repeat unit, to execute a series of multiply-accumulate instructions.
New addressing capabilities enable the CPU to supply the MAC with up to 2 operands per
instruction cycle. MAC instructions (multiply, multiply-accumulate, 32-bit signed arithmetic
operations and the CoMOV transfer instruction) have been added to the standard instruction
set. Full details are provided in the ST10 Family Programming Manual.
4.1 MAC features
Enhanced addressing capabilities
• Double indirect addressing mode with pointer post-modification.
• Parallel Data Move allowing one operand move during Multiply-Accumulate
instructions without penalty.
• CoSTORE instruction (for fast access to the MAC SFRs) and CoMOV (for fast memory
to memory table transfer).
General
• Two-cycle execution for all MAC operations.
• 16 x 16 signed/unsigned parallel multiplier.
• 40-bit signed arithmetic unit with automatic saturation mode.
• 40-bit accumulator.
• 8-bit left/right shifter.
• Scaler (one-bit left shifter)
• Data limiter
• Full instruction set with multiply and multiply-accumulate, 32-bit signed arithmetic and
compare instructions.
• Three 16-bit status and control registers (MSW: MAC Status Word, MCW: MAC Control
Word, MRW: MAC Repeat Word).
The working register of the MAC Unit is a dedicated 40-bit wide Accumulator register. A set
of consistent flags is automatically updated in the MSW register (see Section 4.3.2:
Accumulator & control registers on page 91) after each MAC operation. These flags allow
branching on specific conditions. Unlike the PSW flags, these flags are not preserved
automatically by the CPU upon entry into an interrupt or trap routine.
Note: All dedicated MAC registers must be saved on the stack if the MAC unit is shared
between different tasks and interrupts.