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.

Initializing an HeapMemMP section

I am using the Keystone II and am having trouble Using the IPC modules. I would like to setup MSMC ram and a single IPC managed heap so that I do not have memory contention issues between the DSP cores. I will use this heap to allocate Data memory as well as MessageQ messages to pass back and forth to the ARMs. I cannot figure out how to properly setup the .cfg or the runtime environment to make this work.

I start by trying to create a new SharedRegion and setting createHeap to 1. So that it will create the HeapMemMp buff for me.

	struct SharedRegion_Entry MSMC_Entry;

	ret = SharedRegion_getEntry(0, &MSMC_Entry);

	printf("getEntry returned %d\n", ret);

	MSMC_Entry.base = (Ptr)0x0C000000;
	MSMC_Entry.len =  0x10000;
	MSMC_Entry.ownerProcId = 1;
	MSMC_Entry.isValid = 1;
	MSMC_Entry.cacheEnable = 0;
	MSMC_Entry.cacheLineSize = 0;
	MSMC_Entry.createHeap = 1;
	MSMC_Entry.name = "MSMCRAM";

	ret = SharedRegion_setEntry(1, &MSMC_Entry);

	printf("setEntry returned %d\n", ret);

	ret = SharedRegion_getEntry(1, &MSMC_Entry);

	printf("getEntry returned %d\n", ret);

Everytime SetEntry Fails with value -1. I assume I am missing something in my .cfg or am not setting it up correctly at all.
Here is my .cfg

var
SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion'); SharedRegion.cacheLineSize = 0; SharedRegion.numEntries = 4; SharedRegion.translate = true;

This will be a homogenous system (All DSPs will run the same image).

A couple questions to go along with this:

If I register my Heap with the MessageQ on the DSP side:

                 MessageQ_registerHeap( HeapBufMP_Handle_upCast(heapHandle), HEAPID);

Will the ARM use the same Heap To allocate its messages even though the Heap*MP modules are all BiosOnly?

  • Hi Bill,

    Moved this thread to correct forum for faster response.

    Thank you.

  • Bill,

    The ti.sdo.ipc.heaps package provides three implementations of the xdc.runtime.IHeap interface

    • HeapBufMP
    • HeapMultiBufMP
    • HeapMemMP

    These Heap*MP Modules are only available on SYS/BIOS-based cores, they are not available when running an HLOS (e.g. Linux).
    Go through the section "2.5 Heap*MP Modules" in the IPC user guide to find more detailed information.
    In addition that, this wiki page will help you.
    http://processors.wiki.ti.com/index.php/IPC_Users_Guide/HeapMP_Modules

  • Of course I have gone through the users guide, I am still having trouble which is why I have resorted to the forums. The who concept of this .cfg file is way outside of anything I have ever dealt with. What needs to be in my .cfg besides the usemodule statement? I have been through the IPC users guide over and over and have copied the code exactly from it but it still does not work.

  • Bill,

    The below E2E post will help you get some more details for MessageQ.

    http://e2e.ti.com/support/embedded/tirtos/f/355/p/372246/1311826.aspx#1311826