21.07.2015 Views

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Calling a <strong>DSP</strong>LIB Function from Assembly Language Source Code3.3 Calling a <strong>DSP</strong>LIB Function from Assembly Language Source CodeThe <strong>TMS320C55x</strong> <strong>DSP</strong>LIB functions were written to be used from C. Callingthe functions from assembly language source code is possible as long as thecalling-function conforms with the Texas Instruments C55x C compiler callingconventions. Refer to the <strong>TMS320C55x</strong> Optimizing C Compiler User’s Guide,if a more in-depth explanation is required.Realize that the TI <strong>DSP</strong>LIB is not an optimal solution for assembly-onlyprogrammers. Even though <strong>DSP</strong>LIB functions can be invoked from anassembly program, the result may not be optimal due to unnecessary C-callingoverhead.3.4 Where to Find Sample CodeYou can find examples on how to use every single function in <strong>DSP</strong>LIB, in theexamples subdirectory. This subdirectory contains one subdirectory for eachfunction. For example, the examples/araw subdirectory contains the followingfiles:araw_t.c: main driver for testing the <strong>DSP</strong>LIB acorr (raw) function.test.h: contains input data(a) and expected output data(yraw) for the acorr(raw) function as. This test.h file is generated by using Matlab scripts.test.c: contains function used to compare the output of araw function withthe expected output data.ftest.c: contains function used to compare two arrays of float data types.ltest.c: contains function used to compare two arrays of long data types.ld3.cmd: an example of a linker command you can use for this function.Using <strong>DSP</strong>LIB3-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!