Addressing Modes

Besides the multiplication, accumulation and pre-fetch operations, most MAC class instructions can also write the value of the other accumulator back to a W-register or memory. For example, if the current instruction is operating on accumulator A, then the write back destination argument would specify where accumulator B would get stored. If the other accumulator needs to be written to a W register (for example, if it is an intermediate result in an algorithm), then W13 must be specified as the write-back destination. Accumulator Write-Back to W13 is found useful in algorithms such as Fast Fourier Transform.

On the other hand, if the other accumulator needs to be written to data memory (for example, if it is one of the final results of an algorithm), then an indirect move to a memory location, with W13 as a post-incremented pointer, must be specified as the write-back destination. Accumulator write-back to a memory location using a post-incremented pointer is found useful in algorithms such as Least Mean Square adaptive filtering.

  • Write-Back (WB) stores the “other” accumulator
    • When operating on ACCA, ACCB is stored
    • When operating on ACCB, ACCA is stored
    • Specified as an optional operand in the MAC
  • WB supports direct or indirect addressing
    • WB destination is W13 or [W13]+=2
    • [W13] may point anywhere in data memory

Examples

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.