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.

TDA4VM: TDA4VM Memory usage

Part Number: TDA4VM

Dear support,

I would like to ask a couple of memory usage related questions. I'm developing on TDA4VM J721e, and during boot it says it has 4GB of RAM, however, after logging in, "free" returns the following:

root@j7-evm:~# free
total used free shared buff/cache available
Mem: 2585664 206720 2085312 36352 293632 2004864
Swap: 0 0 0

I was just wondering if I could make the whole 4GB range of RAM accessible somehow to run my application?


Another issue that has come up is that when I'm trying to run pre-implemented tivx nodes of my graph on the C66 DSPs (like color convert nodes or channel extract nodes) these DSPs' CPU usage jumps up to 80% when each of them are running one node only, and when I chain another node, like a colorconv->channel extract sequence, there's a significant frame rate drop, and the performance keeps decreasing as I try to chain more nodes to run sequentially on the DSPs.

Could it be that the performance degradation is caused by the lack of memory on these devices? During boot I've noticed this part:

[ 0.000000] OF: reserved mem: initialized node c66-dma-memory@a6000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a6100000, size 15 MiB

and my guess is that maybe these DSPs try to use this 15MB memory pool to run their given graph nodes and when they run out of this memory, there's a sync that takes up a whole lot of time. If that's the case, is there a way, that I could tell them to use this memory pool instead?

[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000ce000000, size 720 MiB
[ 0.000000] OF: reserved mem: initialized node vision_apps-core-heap-memory@ce000000, compatible id shared-dma-pool

Please ignore my guess if it's completely wrong, but in that case, could you please provide me a brief description on how to run graph node sequences on the C66 DPSs efficiently, so that the performance would not suffer that much?

Kind regards,
Bence

  • I was just wondering if I could make the whole 4GB range of RAM accessible somehow to run my application?

    No! Since the Linux needs memory and other cores also will also need memory.
    I will let my colleague answer question on TIVX.

    - Keerthy

  • Hello Bence,

    OpenVX does not perform any runtime memory allocation and instead performs all of the memory allocation at create time.  There is an OpenVX API called "vxVerifyGraph" which will return an error if the memory is insufficient for a given node to run.  Therefore, since the graph was able to run without getting this error, there is sufficient memory to run these nodes and therefore no need to change the memory map.

    These particular nodes are using cache based memory access rather than DMA, so that is part of the reason why they are slower than expected.

    Regards,

    Lucas

  • Hi Lucas and Keerthy,

    Thanks for your answers. I have an additional question; based on your experience, do you think it's realistic to run multiple nodes chained together (e.g. a segquence of: color convert, channel extract, image mul, remap, image mul, channel combine) for 4 cameras simultaneously and expect at least 15FPS? My goal would be to create an IPM image out of 4 camera images to feed it into my neural net as an input, but I'm afraid that the C66s' performance will not be sufficient to handle this task.

    Kind regards,

    Bence

  • Hello Bence,

    This will depend on a couple of difference factors, such as the resolution of the cameras and the exact nodes you are using.  As you are aware, there are 2 different C66 DSP's, so these nodes can be run on either DSP.

    You can review the below data sheet that has performance information for a given node to help you better estimate what is possible with your use case.

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/08_00_00_12/exports/docs/tiovx/docs/user_guide/TIOVX_PERFORMANCE_J721E_LINUX.html

    Regards,

    Lucas