DSP Accumulators

40-bit Accumulators

  • Two 40-bit Accumulators (ACCA or A, ACCB or B)
    • All words (ACCxU, ACCxH, ACCxL) are individually memory mapped
    • 8-guard bits (ACCxU)
      • Provide greater dynamic range
      • Preserve sign bit
    • Detect overflow conditions
    • Provide saturation when needed
    • Data in and out is accomplished via special instructions
      • LAC – load 16-bit number into 40-bit accumulator
      • SAC – store 40-bit number into 16-bit space
DSPAccumulator.png

Each of the two 40-bit accumulators, A and B, is composed of an upper byte and two 16-bit words arranged as a high word and a low word. You can think of the upper byte, Accumulator Upper, as providing an extra 8 guard bits which can be useful when executing a long series of operations on the accumulator. When the accumulator is loaded by executing a LAC instruction, or as the result of a DSP multiply instruction, the Accumulator Upper register contains sign extension bits. However, as you perform operations on the contents of the accumulator, it is quite possible that the result of the operation may “grow” or overflow into the upper guard bits of the accumulator, provided, of course, that the selected saturation mode allows for this. When this occurs, the guard bits provide computational headroom for accurately operating with these larger numbers. Since the accumulators are memory mapped, each register may alternatively be accessed as a general data memory location using MCU instructions.

Accumulator Instructions

All the instructions are single cycle and do not support pre-fetch or accumulator write-back.

Instruction Operations
ADD Add Accumulators ACCn = ACCn + ACCm
ADD 16-bit signed acc. add ACCn = ACCn + #lit16
LAC Load Accumulator ACCn = X
NEG Negate Accumulator ACCn = -ACCn
SAC Store Accumulator X = ACCn
SAC.R Store Rounded Acc. X = (round)ACCn
SFTAC Arithmetic Shift acc. by lit ACCn = shift(#lit4)ACCn
SFTAC Arithmetic Shift acc. by (Wn) ACCn = shift(Wn)ACCn
SUB Subtract Accumulators ACCn = ACCn - ACCm

As we have seen, accumulators are 40-bits while data paths are 16-bits. So, how do we properly move data between these domains without losing information? The following pages explain the special instructions to manage this process. Those instructions are the following:

  • Load 40-bit accumulator from 16-bit space
    • Zero Backfill
    • Sign Extension
  • Store 40-bit accumulator into 16-bit space
    • Rounding
    • Data Write Saturation
© 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.