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.

C6678 G729 Test App Fails

I am working with the G729 encoder on a C6678 and am trying to get the TestApp working. The project builds fine, but there is a runtime error that occurs when _ALG_allocMemory() is called by ALG_create(). The for loop which calls memalign() fails on the third iteration. What are the possible causes of this issue?

Chris

Signalogic

  • Are you using Codec Engine or Framework Components ? If so, could you share the version ?

  • I don't think so. I added the files from the installed test app to an existing CCS project that wasn't using either of these. Are these needed to run the test app?

  • I am not familiar with the software that accompanies the codec. It is entirely possible that they have their own implementation of the codec's IALG implementation. Hopefully some codec experts will be able to help with your queries.

  • Ok I will wait for a codec expert then.

    I have tried adding the AMR codec test app as well, but it runs into the same problem since it uses the same function. I have tried increasing the heap size, increasing data memory, and moving data memory from L2SRAM to MSMCSRAM, but none of these made a difference. The third iteration through the loop uses a larger size than the other iterations. Is there anything other than memory available that would limit the size that could be pass to a memalign() call on the C6678?

  • Hi,

    If you are using the existing CCS projects in the codec package, there is no need add any additional files. The CCS projects should be self sufficient to build and run the codecs. Can you please give us details of URL from where you have downloaded this codec? We will have look at it.

    -Venkat

  • Venkat,

    I downloaded the codec package through dspsupport.ti.com/. It looks like the site is down right now, so I can't access it to get the direct download link. It is version 1.0.0.3. I am using Advantech's 8681E board and using PCIe to connect to the board. I had to modify the project for this reason so that it will read the input file from DDR3 memory and write the output file there as well.
    I'm not using the existing CCS project in the codec package. I took the source and header files from the package and added them to my own project as my goal is to get the codec integrated with this project. Currently, this project doesn't do anything else but call the test app's main function.
    Are there specific settings in the CCS project that comes with the codec package that are required for the test app to run? I am also using my own .cmd file. Would this make a difference?

    Chris

  • Hi Chris,

    I suggest you to open the existing CCS project files in simulator and execute them, that will give you an idea on which source files are required to build the test app. However, there are no specific project options used, you just need to add right set of source files and build the project.

    .cmd file could also be another reason. Please check it with the one provided in the package.

    -Venkat

  • Venkateswara-

    It's not a file or build issue, as Chris has described.  The issue is that at run-time memalign() succeeds initially then soon fails with no error code or other indicator.

    In my experience over the years, standard TI E2E advice is to use actual hardware if available, as the simulator does not produce end-product code, and tends to be somewhat less supported.  In this case we're using the quad C6678 PCIe card, and that's where we need to successfully and reliably call memalign().  Can you give us some ideas of what can go wrong with this call?  If  it fails, what are some likely causes?

    Thanks.

    -Jeff

  • Hi,

    You can check the heap allocation, how much you are allocating, is it sufficient?

    -Venkat

  • Venkat,

    I am allocating 64KB of heap using '-heap 0x10000' in the .cmd file. I tried increasing this to 1MB and it didn't seem to make any difference.

    -Chris

  • Venkat,

    My understanding is that setting the heap size this way sets the size of the .sysmem section as that is where the heap is located. Is this correct? If so, is there a different heap used elsewhere for the memalign() call?

    -Chris

  • Venkat-

     

    In the .map file, which section has the heap used by memalign() calls in the G729 and AMR-NB codecs?

    If we are comparing the simulator project and the quad 6678 PCIe card project, what section(s) to compare?

    Thanks.

    -Jeff

     

  • Hi,

    As you pointed the heap memory will be placed to .sysmem, and 64KB of heap is more than enough for the codec. I think, there is some other problem here.

    Can you please share your project/code to have a look at it?

    -Venkat

  • Venkat,

    After doing some research, we found that the heap in .sysmem wasn't used. I removed the line from the .cmd file that set the heap size and added these lines to the .cfg file:

    BIOS.heapSize = 0x10000;
    BIOS.heapSection = "Heap";

    This has fixed the issue for use and we can now run the codec. Thank you for your help.

    Chris