Digital Signal Processing Reference
In-Depth Information
tions
ADDDP
and
MPYDP
have six and nine delay slots, respectively. However, the
floating-point double-word load instruction
LDDW
(with four delay slots, as with the
fixed-point
LDW
) can load 64 bits. Two
LDDW
instructions can execute in parallel
through both units
.S1
and
.S2
to load a total of 128 bits per cycle.
A single-precision floating-point value can be loaded into a single register,
whereas a double-precision floating-point value is a 64-bit value that can be loaded
into a register pair such as A1:A0, A3:A2,...,B1:B0, B3:B2,...The least signifi-
cant 32 bits are loaded into the even register pair, and the most significant 32 bits
are loaded into the odd register pair.
One may need to weigh the pros and cons of dynamic range and accuracy with
possible degradation in speed when using floating-point types of instructions.
3.18.3 Division
The floating-point C6713 processor has a single-precision reciprocal instruction
RCPSP
.
A division operation can be performed by taking the reciprocal of the
denominator and multiplying the result by the numerator [6]
.
There are no fixed-
point instructions for division. Code is available to perform a division operation by
using the fixed-point processor to implement a Newton-Raphson equation.
3.19 CODE IMPROVEMENT
Several code optimization schemes are discussed in Chapter 8 using both fixed- and
floating-point implementations and ASM code.
3.19.1 Intrinsics
C code can be optimized further by using many of the available
intrinsics
in the run-
time library support file. Intrinsic functions are similar to run-time support library
functions.
Intrinsics
are available to multiply, to add, to find the reciprocal of a
square root, and so on. For example, in lieu of using the asterisk operator to multi-
ply, the intrinsic
_mpy
can be used.
Intrinsics
are special functions that map directly
to inline C6x instructions. For example,
int _mpy()
is equivalent to the assembly instruction
MPY
to multiply the 16 LSBs of two
numbers. The intrinsic function
int _mpyh()
is equivalent to the assembly instruction
MPYH
to multiply the 16 MSBs of two
numbers.
Search WWH ::
Custom Search