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.

A weird problem in DSP migrating from RDK 2.8 to RDK 3.2 for DM8148

My DSP algorithm was running smoothly on rdk 2.8. 

After migrating to rdk 3.2, it becomes unstable. After running for a random period of time, it outputs:

[m3vpss ] Stream ID 0: Input queue empty condition.
[m3vpss ] Stream ID 1: Input queue empty condition.

continuously with no DSP information output. 
I have narrowed it down to one function involving two long arrays. Without this function, the DSP algorithm can run over night, no problem. 
The function is something like this: 
int func(int *ptrA, int *ptrB) 
{
    for (i=0;i<256*256;i++)
   {
         *(ptrA + i) = *(ptrA+i) + *(ptrB+i);
    }
}
ptrA and ptrB are both allocated using Utils_memAlloc(x, y), which locates in SR2, frame buffer shared by VPSS and Video M3.
Then I moved both memory allocation to TILER(0xB000:0000) space since we are not using it at all, but still the same error.
My question is from 2.8 to 3.2, except the slight changes in the memory map, is there anything else might cause this? \
Thanks a lot. Any input is appreciated.
  • Hi,

    Can you measure execution time of the function. It may be too high.
    You better allocate memory from cached memory, Tiller region is not cached on DSP. You can enable caching by setting  MAR bits in FC_RMAN_IRES_c6xdsp.cfg.
    You can also increase local DSP data memory (DSP_DATA_SIZE in config_512M.bld) and then use static allocation, or dynamic allocate memory from default local heap 0 :
                 void *pBuf1 = (  void *)  Memory_alloc(0, numBytes, 128, &eb);  
    Instead of function call use inline code, or use restrict keyword for function parameters, to enable better compiler optimisation.

    Regards.


     

  • Hi, Marko

    Thanks a lot for the reply and great suggestion. What I don't understand is the change from 2.8 to 3.2, on RDK 2.8 when my DSP algorithm was even slower, it didn't cause this issue at all. 

    I will try out your suggestion and update here. 

    Thanks