Calling A Dsplib Function From C; Calling A Dsp Function From Assembly; Dsplib Testing − Allowable Error; Dsplib Overflow And Scaling Issues - Texas Instruments TMS320C64X Programmer's Reference Manual

Dsp little-endian dsp library
Hide thumbs Also See for TMS320C64X:
Table of Contents

Advertisement

Using DSPLIB
Using DSPLIB
2.2.2

Calling a DSPLIB Function From C

2.2.3

Calling a DSP Function From Assembly

2.2.4
DSPLIB Testing − Allowable Error
2.2.5

DSPLIB Overflow and Scaling Issues

2-4
In addition to correctly installing the DSPLIB software, follow these steps to
include a DSPLIB function in the code:
-
Include the function header file corresponding to the DSPLIB function
-
Link the code with dsp64plus.lib
-
Use a correct linker command file for the platform used.
The examples in the DSP\Examples folder show how to use the DSPLIB in a
Code Composer Studio C envirionment.
The C64x+ DSPLIB functions were written to be used from C. Calling the
functions from assembly language source code is possible as long as the
calling function conforms to the Texas Instruments C64x+ C compiler calling
conventions. For more information, see Section 8 (Runtime Environment) of
TMS320C6000 Optimizing C Compiler User's Guide (SPRU187).
DSPLIB is tested under the Code Composer Studio environment against a
reference C implementation. You can expect identical results between
Reference C implementation and its Assembly implementation when using
test routines that focus on fixed-point type results. The test routines that deal
with floating points typically allow an error margin of 0.000001 when
comparing the results of reference C code and DSPLIB assembly code.
The DSPLIB functions implement the same functionality of the reference C
code. You must conform to the range requirements specified in the API
function, and in addition, restrict the input range so that the outputs do not
overflow.
In FFT functions, twiddle factors are generated with a fixed scale factor; i.e.,
15−1
32767(=2
) for all 16-bit FFT functions, 1073741823(=2
DSP_fft32x32s, 2147483647(=2
Twiddle factors cannot be scaled further to not scale input data. Because
DSP_fft16x16r and DSP_fft32x32s perform scaling by 2 at each radix-4 stage,
the input data must be scaled by 2
overflow. In all other FFT functions, the input data must be scaled by 2
because no scaling is done by the functions.
31−1
) for all other 32-bit FFT functions.
(log2(nx)−cei[log4(nx)−1])
to completely prevent
30−1
) for
(log2(nx))

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c64x+

Table of Contents