Motorola DSP56305 Manuel d'utilisateur Page 23

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 112
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 22
2-8 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Data Operations
Using the barrel shifter
2.4 USING THE BARREL SHIFTER
The DSP56300/DSP56600 includes a true barrel shifter that can be
used for multi-bit data shifts. The instructions that use the barrel
shifter are listed in Table 2-4.
The logical shifts operate on the most significant register (A1/B1) of
the accumulator destination (the accumulator extension and LS
register are not affected). The arithmetic shifts operate on the full
length of the source and destination accumulators, sign extending
when applicable. In addition to the multi-bit shifts, there are also
four respective single bit shift instructions that allow parallel moves
(the multi-bit shifts do not allow them).
The NORMF instruction deserves special attention, as it can
effectively replace several instructions in many common
algorithms. The NORMF instruction arithmetically shifts the data
from the destination accumulator (D) in the direction and amount
specified by the first operand (C). If C > 0, then D is arithmetically
shifted to the left by C bits. If C < 0, then D is arithmetically shifted
to the right by C bits. The operand C should normally be prepared
by the CLB instruction (Count Leading Bits). The instruction pair:
clb a,b
normf b1,a
Table 2-4 Data Operations Using Multi-shift
Mnemonic Function Operands
ASL
Arithmetic
Shift Left
C,S,D
C: number of shift bits
S: source of shift
D: destination
6-bit immediate, or
X0,X1,Y0,Y1,A1,B1
A,B
A,B
ASR
Arithmetic
Shift Right
LSL
Logical
Shift Left
C,D
S: number of shift bits
D: source & destination
5 -bit immediate, or
X0,X1,Y0,Y1,A1,B1
A,B
LSR
Logical
Shift Right
NORMF
Fast
Normalizat
ion
C,D
C: control of shift
D: destination
X0,X1,Y0,Y1,A1,B1
A,B
Vue de la page 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 111 112

Commentaires sur ces manuels

Pas de commentaire