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.

DSPF_sp_mat_mul function problem

Other Parts Discussed in Thread: SYSBIOS, OMAP-L137

Hello All,

I have a problem with DSPF_sp_mat_mul(.asm) function in C674x_dsplib. The version is 1.03.00.01.

DSP : C6747

When we use this function to mix multiple audio source to multiple output, it works correctly for first 10 to 15 sec. But after that, the function always stops and the entire DSP program also stops(including SYSBIOS). It happens regardless of matrix size, it happens with 4x4 matrices multiplication.

It seems a bug, and we guess that there is a problem of memory usage. it looks like the function might be crashing the unexpected memory area.

Attached image is a log information on CCS, though it is a bit old information.

Could you check the function and advise me?

Thank you.

Best regards,

Shitnaro

  • Hi Shitnaro,

    I can suggest you you to narrow down where the problem is. Actually there are sample examples and benchmark examples available to test the function, "DSPF_sp_mat_mul". You can modify in such a way that it runs for more than 15 sec and compare the results.

    Existing example:

    "~\dsplib_c674x_3_1_1_1\packages\ti\dsplib\src\DSPF_sp_mat_mul\c674"

    I just tried out this example in which they ran 100 iterations of that function and providing their results. Try out the same example to run for longer time and check.

    This attempt will confirm the reliability of the dsplib function. If this is successful, you can focus on your application code which uses this function.

  • [User name and signature are different. Which is correct, sir?]

    Sir,

    The log shows NRP=0x3f800000 which is invalid memory space. Something has occurred to put the PC in an invalid location, and there are many things that can do that.

    Please replace the call to DSPF_sp_mat_mul with a different version of that function (.c, .cn) or with a simplified memory copy. Run with a different function and see whether you have the same results.

    Please describe for us the debugging you have done that has determined the bug is in this function. This function has been available for customers to use for many years and this bug is not a known bug. We cannot rule out a bug here but it is impossible to debug this from our side without a simplified test case example. If you can generate that, we can determine the cause of the error.

    Your team's debug time will be spent well by setting breakpoints or inline test in the code after some period of time. You will want to check the stack pointer to see if it is growing improperly as time progresses. You will also want to check the available free heap memory as time progresses.

    Regards,
    RandyP
  • Hi Shankari,

    Thank you for your advice.

    we will test it using the benchmark sample.

    Best regards,

    Shintaro,

  • Hi RandyP,

    Thank you for your reply and pointing out a typo of my signature:).


    We tried "_cn.c" and "_opt.c" versions of the DSPF_sp_mat_mul function, and they worked fine even for hours. We checked this with OMAP-L137 EVM board and our own PCB board.

    Actually, we checked with EVM board about four years ago, and we faced this problem. But it was very early stage of development and we were not familiar with the device, so we have put aside. Recently we started investigation again because we want to reduce processing by using the function.

    With OMAP-L137 EVM board, we used a sample code named "audioSample" which is provided by TI. And we are using XDS560v2 for debugging. We just call the DSPF_sp_mat_mul function in audio main loop. We used following tools with the EVM :

    PSP version 2.00.01
    DSP/BIOS 6.21.02.19

    If any further information needed, please let me know.

    We will check stack and heap memory. Thank you.

    Best regards,
    Shintaro
  • Shintaro-san,

    Your experiment with the "_cn.c" and "_opt.c" versions of the DSPF_sp_mat_mul function seems conclusive.

    Could you please export the audioSample-based CCS project that shows the bug into a zip file? We will need this to be able to duplicate the bug behavior and get it fixed. Your help will be vital.

    Which version of CCS are you using?

    Regards,
    RandyP