3.3.12.5 Barrel Shifter

The barrel shifter can perform up to a 32-bit arithmetic right shift, or up to a 32-bit left shift, in a single cycle. DSP or MCU instructions can use the barrel shifter for multibit shifts.

The shifter requires a signed binary value to determine both the magnitude (number of bits) and direction of the shift operation.

  • A positive value shifts the operand right.
  • A negative value shifts the operand left.
  • A value of ‘0’ does not modify the operand.

The barrel shifter is 72 bits wide to accommodate the width of the accumulators. A 72-bit output result is provided for DSP shift operations, and a 32-bit result is provided for MCU shift operations.

Table 3-7 provides a summary of instructions that use the barrel shifter.

Table 3-7. Instructions that Use the DSP Engine Barrel Shifter
InstructionDescription

ASR

Arithmetic multibit right shift of data memory location

LSR

Logical multibit right shift of data memory location

SL

Multibit shift left of data memory location

SAC

Store DSP accumulator with optional shift

SFTAC

Shift DSP accumulator