Motorola DSP56305 Manuel d'utilisateur Page 26

  • 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 25
Data Operations
Double precision arithmetic
MOTOROLA Optimizing DSP56300/DSP56600 Applications 2-11
is specified by its width (in bits) and its starting position (in bits,
relative to the LSB of the accumulator). The width and position
values could be prepared using the MERGE instruction, which
merges data from two data registers in the appropriate positions for
future use as a control operand for EXTRACT and INSERT.
The EXTRACT instruction extracts the specified field, right-aligns it,
and sign-extends it in the destination accumulator. The EXTRACTU
instruction does the same, but does not sign-extend the result. The
INSERT instruction takes a right-aligned field of the specified width
from the source register and places it in the specified position in the
destination accumulator.
Detailed examples of the use of these instructions for parsing and
creating a data stream, and parsing Hoffman code data stream can
be found in Appendix C of the
DSP56300
and
DSP56600 Family
Manuals
.
2.6 DOUBLE PRECISION ARITHMETIC
The DSP56300/DSP56600 has instructions to help the programmer
implement arithmetic operations if the operands are longer than
standard accumulator size. Using these instructions can help
achieve enhanced precision with minimum software overhead. The
examples below relate to the DSP56300 core register size (24 bits for
data registers, 56 bits for an accumulator), but can be adapted for
the DSP56600 core by changing the register size accordingly.
The normal ADD and SUB instructions can add a 48-bit operand
(X1:X0, for example) to an accumulator, and, of course, can add a
56-bit accumulator to another. Furthermore, the user may use ADC
(Add long with Carry) or SBC (Subtract long with Carry), which
adds (subtracts) a 48-bit operand to (from) an accumulator with a
carry (borrow) bit from a previous calculation.
The normal MPY (multiply) or MAC (multiply-accumulate)
instructions multiply two 24-bit operands to give a 48-bit result.
Implementing 32 × 32-bit or 48 × 48-bit multiplication requires four
24 × 24 multiplications, and some shifting and addition operations.
The DSP56300 and DSP56600 specialized instructions can help
reducing these extra operations to a minimum. Consider for
example 48 × 48 multiplication, where only the forty-eight Most
Significant Bits are needed, and the forty-eight Least Significant Bits
discarded. Figure 2-2 on page 2-12 illustrates the required
operations.
Vue de la page 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 111 112

Commentaires sur ces manuels

Pas de commentaire