Academic Program

Accumulator Write-Back

Accumulator Write-Back

The Accumulator Write-Back is a special feature that may be used with several DSP instructions. This method of storage allows us to use W13 or W13 indirect with post-increment as the target destination of the accumulator move but does not allow for the data to be shifted as it is stored. The MAC class of instructions (with the exception of MPYMPY.NED, and EDAC) can optionally write a rounded version of the high word of the accumulator that is not targeted by the instruction into data space memory. The write is performed across the X bus into the combined X and Y address space. The following addressing modes are supported:

  • W13, Register Direct:
    • The rounded contents of the non-target accumulator are written into W13 as a 1.15 fraction.
  • [W13]+ = 2, Register Indirect with Post-Increment:
    • The rounded contents of the non-target accumulator are written into the address pointed to by W13 as a 1.15 fraction. W13 is then incremented by 2 (for a word write).

Accumulator Write-Back is used extensively in FFT for the innermost butterfly operation; it is also used in LMS coefficient calculation for adaptive filters.

Accumulator Write-Back:

  • Writes back opposite accumulator
    • While one accumulator is the destination for an instruction, the opposite one is idle and available to be stored
      • Useful for certain algorithms such as FFT and adaptive filters
  • Stores rounded ACCxH to W13 or [W13]+=2
    • Must be W13
    • If W13 not indicated, then no write back performed
    • Rounding type determined by CORCON<RND>
CLR A,[W8]+=2,W4,W13                        ;operate on A, store rounded B to W13
CLR A,[W8]+=2,W4                            ;operate on A, no write back
MAC W4*W5,A,[W8]-=2,W4,[W10]+=2,W5,W13      ;operate on A, store rounded B to W13
MSC W4*W5,B,[W11+W12],W5,[W13]+=2           ;operate on B, store rounded A to address
                                            ;pointed to in W13, post-increment W13