This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using the DSPlib with the Audio Filter Demo

I've been working on a project that is based off the wonderful Audio Filter demo for the c5505 eZDSP board and I would like to use some of the function calls in the DSP library, but i'm having some issues getting it to work.

I downloaded the current library version, extracted everything, and tried to follow the installation directions, but I'm still not quite sure how to get it up and running. I saw that the audio filter demo uses the fir.asm file, which is included in the DSP library, but for the demo the variables are declared as Int16 rather than the ushort which caused an error when I tried to include the DSP library.
I would like to use the maxval, firinterp, and firdec functions from the library and i'm not quite sure if i need to include the DSPlib differently than what i'm doing now or if i need to modify these functions slightly for the audio demo.

Thanks!

  • Hi George,

    You can just move the particular assembly files from the DSPLIB src directory into the project directory and then call them from main_bypass1.c. Also add the function prototypes into ref_data_bypass.h. (Copy how it was done for fir)

    You can use Int16 for DATA and Uint16 for ushort to match the DSPLIB datatypes. See the comparison below:

    Audio Filter Demo:
    typedef short Int16; ...
    Int16 RcvL1[XMIT_BUFF_SIZE];
    Int16 fir(Int16 *input,Int16 *Coeff,Int16 *output, Int16 *dbuffer, Int16 NumOfInput,Int16 NumOfCoeff);

    -----

    DSPLIB:
    typedef short DATA;
    typedef unsigned short ushort;
    DATA x[NX] ={...} ushort fir(DATA *x, DATA *h, DATA *r, DATA *dbuffer, ushort nx, ushort nh);

    DSPLIB uses mnemonic assembly, so after adding the asm file to the project directory, right click on the file inside Code Composer and click on Properties. Under C/C++ Build, Under C5500 Compiler, click on Runtime Model Options, and change the "Select assembly source language" to mnemonic. Also make sure "Codegen outputs algebraic assembly" is unchecked. This will let you call DSPLIB functions from the Audio Filter Demo.

    You should also consider the lengths of the arrays output by DSPLIB routines and the lengths of the DMA transfers.

    Let me know if you have any trouble.

    Hope this helps,
    Mark

  • Mark,

    Thank you very, very much for the assistance! I followed your instructions and everything is working perfectly!!!

    Take care!

    George