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.

fft result failure

Hello, I am a beginner in C6678 dsp and i am quite interested in it!

The question is that I debug a float fft project in the dsplib for c6678.this project is in the path c:\ texas instruments\dsplib_c66x_3_0_0_7\packages\ti\dsplib\src\dspf_sp_fftspxsp.

I use cycle approximate simulator,little endian,only core 0 running.release mode.

the link.cmd is as follow:

-heap  0x8000
-stack 0xC000

MEMORY
{
    L2SRAM (RWX) : org = 0x800000, len = 0x100000
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000
}

SECTIONS
{
    .kernel: {
       *.obj (.text:optimized) { SIZE(_kernel_size) }
    }

    .text: load >> L2SRAM
    .text:touch: load >> L2SRAM
   
    GROUP (NEAR_DP)
    {
    .neardata
    .rodata
    .bss
    } load > L2SRAM
  
    .far: load >> L2SRAM
    .fardata: load >> L2SRAM
    .data: load >> L2SRAM
    .switch: load >> L2SRAM
    .stack: load > L2SRAM
    .args: load > L2SRAM align = 0x4, fill = 0 {_argsize = 0x200; }
    .sysmem: load > L2SRAM
    .cinit: load > L2SRAM
    .const: load > L2SRAM START(const_start) SIZE(const_size)
    .pinit: load > L2SRAM
    .cio: load >> L2SRAM
    xdc.meta: load >> L2SRAM, type = COPY
}

the result for my project is :

1,[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Successful    N = 1024   radix = 4  natC: 39123  optC: 7994

this is Successful.    .

2,

    [TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Failure  max_pct_diff = +Inf N = 2048    radix = 2  natC:    94438   optC: 19047

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Failure  max_pct_diff = 114846.093750  N = 4096   radix = 4  natC: 188643 optC: 37743

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Failure  max_pct_diff = 421790.906250  N = 16384  radix = 4  natC: 884979  optC: 176548

these are failure.

you can see when N>=2048 the result is failure.I don't know why?

And then I change the link.cmd.

the new link.cmd is as follow:

-heap  0x8000
-stack 0xC000

MEMORY
{
    L2SRAM (RWX) : org = 0x800000, len = 0x100000
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x400000
}

SECTIONS
{
    .kernel: {
       *.obj (.text:optimized) { SIZE(_kernel_size) }
    }

    .text: load >> MSMCSRAM
    .text:touch: load >> MSMCSRAM
   
    GROUP (NEAR_DP)
    {
    .neardata
    .rodata
    .bss
    } load > MSMCSRAM
  
    .far: load >> MSMCSRAM
    .fardata: load >> MSMCSRAM
    .data: load >> MSMCSRAM
    .switch: load >> MSMCSRAM
    .stack: load > MSMCSRAM
    .args: load > MSMCSRAM align = 0x4, fill = 0 {_argsize = 0x200; }
    .sysmem: load > MSMCSRAM
    .cinit: load > MSMCSRAM
    .const: load > MSMCSRAM START(const_start) SIZE(const_size)
    .pinit: load > MSMCSRAM
    .cio: load >> MSMCSRAM 
    xdc.meta: load >> MSMCSRAM type = COPY
}

what I do is to map the project from L2 to MSMCSRAM.

the result is :

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Successful    N = 1024   radix = 4  natC: 39123  optC: 8002

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Failure  max_pct_diff = +Inf N = 2048    radix = 2  natC: 94438   optC: 19055

/*

[TMS320C66x_0] Invalid CIO command (0) in the CIO buffer at address (0xc0438e8) was not recognized. Please check the device and program memory maps.

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Failure  max_pct_diff = 50686.066406   N = 4096   radix = 4  natC: 188643  optC: 1818453320

*/

you can see when N=2048 ,the result is failure.

and when N=4096,there is a error.

I want to know why?

so I change my link.cmd again.

my new link.cmd is as follow:

-heap  0x8000
-stack 0xC000

MEMORY
{
    L2SRAM (RWX) : org = 0x800000, len = 0x100000
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x400000
}

SECTIONS
{
    .kernel: {
       *.obj (.text:optimized) { SIZE(_kernel_size) }
    }

    .text: load >> MSMCSRAM
    .text:touch: load >> MSMCSRAM
   
    GROUP (NEAR_DP)
    {
    .neardata
    .rodata
    .bss
    } load > MSMCSRAM
  
    .far: load >> MSMCSRAM
    .fardata: load >> MSMCSRAM
    .data: load >> MSMCSRAM
    .switch: load >> MSMCSRAM
    .stack: load > MSMCSRAM
    .args: load > MSMCSRAM align = 0x4, fill = 0 {_argsize = 0x200; }
    .sysmem: load > MSMCSRAM
    .cinit: load > MSMCSRAM
    .const: load > MSMCSRAM START(const_start) SIZE(const_size)
    .pinit: load > MSMCSRAM
    .cio: load >> L2SRAM
    xdc.meta: load >> MSMCSRAM type = COPY
}

In this cmd file I only change the .cio.

and then my result change:

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Successful    N = 2048   radix = 2  natC: 94438  optC: 19055

[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Successful    N = 4096   radix = 4  natC: 188643 optC: 37751[TMS320C66x_0] DSPF_sp_fftSPxSP Iter#: 1   Result Successful    N = 8192   radix = 2  natC: 442614 optC: 88484

they are all right.I want to know why ?can I change link.cmd like this?will it result another problem?

Thanks in advance!

  • Hi,

    We are investigating the issues you posted here and will provide update once we have some conclusions.

    Xiaohui

     

     

  • Hi,

    We found that the floating point FFT routine from C66x DSPLIB works on C6678 Functional Simulator and EVM for large size FFTs such as 1024 and 4096, but fails on C6678 Cycle Approximate Simulator.  We are still investigating why it's failing on the cycle approximate simulator and will provide more updates later.  In the mean time, you can continue your work on either C6678 Functional Simulator or C6678 EVM.

    Xiaohui