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
Microchip Technology acquires Atmel