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.

DSPLib Rfft Example Project

Other Parts Discussed in Thread: TMS320C5505

Hi all,

I have been trying to code an audio noise reduction routine using DSPLib 2.4 on the eZDSP TMS320C5505 stick, however I came across some problems using the rfft and rifft functions, as they did not behave as I expected them to.

I then went right back to basics to try and understand how they function and how I should be using them, and I tried to compile and run the example rfft code found in the example folder in the DSPLib folder. However I cannot get this to run either! The code seems to hang somewhere inside the rfft function, probably within one of the .asm it uses.

I am new to CSS, so it could be I am doing something very stupid here, and I have now spend almost a whole day trying to make something work that I feel should be trivial. I was wondering if anyone could possibly create and put up a project file for the rfft example that runs on their c5505 stick, so I can try and see where I am going wrong?

I believe I am using a v3.3 silicon, and have rebuilt the DSPLib for that (Although that could be wrong as well...). I can put up what I have done if anyone wants it.

Thanks,

J

  • Update 1:

    I seem to be able to get add() working as it compiles, runs, and doesnt hang within add.asm, however I still cannot get rfft() working. I also tried cfft() which also hangs.

    Could anyone point out anything obviously wrong in the steps I am taking to try and use the DSPlib.

    DSPlib folder is on desktop, along with project folder, workspace is in my documents.

    1 - Rebuild library for 3.3 CPU using altered .bat file as shown below

         REM this file is for building DSPLIB in huge memory module on C5505/15
         REM call c:\ti\dosrun.bat
         set CGT_BIN=C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C5500/bin
         set PATH=%PATH%;%CGT_BIN%

         REM Equivalent OPTIONS for C5505/15, huge memory model:
         REM set OPTIONS= -g -vcpu:3.3 --memory_model=huge --ptrdiff_size=32
         REM set OPTIONS= -g -v5515 --memory_model=huge --ptrdiff_size=32
         REM set OPTIONS= -g -v5505 --memory_model=huge --ptrdiff_size=32
         REM set DSPLIB=55xdsph
         REM Equivalent OPTIONS for C5505/15, large memory model:
         set OPTIONS= -g -vcpu:3.3 --memory_model=large
         set OPTIONS= -g -v5515 --memory_model=large
         set OPTIONS= -g -v5505 --memory_model=large
         set OPTIONS= -g -v5505 -ml
         set DSPLIB=55xdspx
     
         set SRC=55x_src
         set FILES= *.asm
         set EXT=asm
         REM built library in SRC dir  and then copy to root
         del %DSPLIB%.src
         del %DSPLIB%.lib
         cd %SRC%
         del *.obj
         cl55 %OPTIONS% %FILES%
         ar55 -r %DSPLIB%.src *.%EXT% ..\include\*.h
         ar55 -r %DSPLIB%.lib *.obj
         copy %DSPLIB%.src ..
         copy %DSPLIB%.lib ..
         del *.src
         del *.lib
         dir *.obj >> ..\junk.txt
         del *.obj
         cd ..

    2 - Linking 55xdspx.lib to project.

    3 - Including tms320.h dsplib.h math.h and stdio.h in project, and adding #include in main for these

    4 - Setting the compiler run time model option to "large memory model" and using rts55x.lib for the linker library.

    5 - Altering c5505.cmd to put .fftcode and .twiddle in SARAM as shown below

         MEMORY
         {
             MMR     (RW) : origin = 0000000h length = 0000c0h /* MMRs */
             DARAM (RW)    : origin = 00000c0h length = 00ff40h  /* on-chip DARAM */
             SARAM   (RW)  : origin = 0030000h length = 01e000h /* on-chip SARAM */

            SAROM_0 (RX)  : origin = 0fe0000h length = 008000h     /* on-chip ROM 0 */
             SAROM_1 (RX)  : origin = 0fe8000h length = 008000h     /* on-chip ROM 1 */
             SAROM_2 (RX)  : origin = 0ff0000h length = 008000h     /* on-chip ROM 2 */
             SAROM_3 (RX)  : origin = 0ff8000h length = 008000h     /* on-chip ROM 3 */
       
             EMIF_CS0 (RW)  : origin = 0050000h  length = 07B0000h   /* mSDR */
             EMIF_CS2 (RW)  : origin = 0800000h  length = 0400000h   /* ASYNC1 : NAND */
             EMIF_CS3 (RW)  : origin = 0C00000h  length = 0200000h   /* ASYNC2 : NAND  */
             EMIF_CS4 (RW)  : origin = 0E00000h  length = 0100000h   /* ASYNC3 : NOR */
             EMIF_CS5 (RW)  : origin = 0F00000h  length = 00E0000h   /* ASYNC4 : SRAM */
         }


         SECTIONS
         {
             vectors (NOLOAD)
             .bss        : > DARAM /*, fill = 0 */
             vector      : > DARAM      ALIGN = 256
             .stack      : > DARAM 
             .sysstack   : > DARAM 
             .sysmem     : > DARAM
             .text       : > SARAM 
             .data       : > DARAM
             .cinit         : > DARAM
             .const         : > DARAM
             .cio        : > DARAM
             .usect       : > DARAM
             .switch     : > DARAM
             .emif_cs0   : > EMIF_CS0
             .emif_cs2   : > EMIF_CS2
             .emif_cs3   : > EMIF_CS3
             .emif_cs4   : > EMIF_CS4
             .emif_cs5   : > EMIF_CS5
       
             .fftcode : > SARAM         /* FFT-specific sections, taken from RFFT example project cmd file  */    
             .twiddle : > SARAM, align(2048)

    }

    I am really stuck right now, hopefully it's something simple I'm doig wrong.

    Thanks,

    J