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.

IPC Memory Footprint

Other Parts Discussed in Thread: SYSBIOS, TMS320C6678

Hi,

   adding the IPC modules to our app. added approx. 100K to the memory usage.

 

   total ~100,000, with the text section accounting for most at ~93000

   Is this expected and is there any way to significantly reduce this?

   I've below included the relevant portions of my cfg file

 

- thanks

 

<begin cfg file>

var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');

MultiProc.setConfig(null, ["CORE0", "CORE1"]);

var Notify      = xdc.useModule('ti.sdo.ipc.Notify');

var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');

 

/* To avoid wasting shared memory for MessageQ transports */

for (var i = 0; i < MultiProc.numProcessors; i++) {

    Ipc.setEntryMeta({

        remoteProcId: i,

        setupMessageQ: false,

    });

}

 

/* Synchronize all processors (this will be done in Ipc_start) */

Ipc.procSync = Ipc.ProcSync_ALL;

 

/* Shared Memory base address and length */

var  SHAREDMEM           = 0x0C3F0000;

var SHAREDMEMSIZE       = 0x00010000;

 

/* 

 *  Need to define the shared region. The IPC modules use this

 *  to make portable pointers. All processors need to add this

 *  call with their base address of the shared memory region.

 *  If the processor cannot access the memory, do not add it.

 */ 

var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');

SharedRegion.setEntryMeta(0,

    { base: SHAREDMEM, 

      len:  SHAREDMEMSIZE,

      ownerProcId: 0,

      isValid: true,

     name : "MSMCSRAM",

    });

 

  • Hi,

    Which version of IPC are you using?  Also what device are you building for?

    You can look in the Ipc user's guilde.pdf, it gives some information about what you can do.

    Here are a few things you try by adding to your *.cfg file to optimize.

    /* Optimization stuff */
    var Diags = xdc.useModule("xdc.runtime.Diags");
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF
    Defaults.common$.logger = null;

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = false;
    BIOS.assertsEnabled = false;

    Judah

  • IPC version = ipc_1_23_01_26

    I did try the recommendations in the IPC user's guide but it appears to affect only run time data.  Of course that will help us minimize the size of the shared-memory block.

     

    Regarding your optimization recommendations, it did shave off an impressive ~50K bytes from the previous 100K.

     

    So is this the leanest version available?  I ask only because 50K is a bit expensive for our system.

     

  • Which device are you using again?

    I don't think there's anything else you can do to get another magnitude of 10K bytes but I think you might be able to reduce it some more.

    I don't know if the Ipc user guide you are using is up to date.  I've attached the latest user guide which might have a few more tricks you can try, especially with respect to reducing the number of Notify events and/or picking a Notify driver which uses less shared memory.

    7115.IPC_Users_Guide.pdf

    Judah

  • Our current device is the  TMS320C6678 based evm board but eventually we plan to settle on its close relative C6674.  (Very low likelihood but their close cousin C6672 is also in being  considered.)

     

    Regarding your linked document, many of the mentioned optimizations were  attempted but did not produce any significant gains.

     

    So short of writing custom notify & messageQ modules, and our needs are relatively minimal, any other suggestions?  I notice the Mailbox module but it appears to only be for intracore messaging and I did not run into intercore messaging modules.

     

  • Did you already look at the BIOS user guide.pdf?  There's a chapter called "Minimizing the Application footprint".  Some of my suggestions earlier came from there but there might be a couple more there that I didn't suggest yet.  I've attached it here for your convenience.

    2627.Bios_User_Guide.pdf

    Mailbox is, as you state, only for intracore.  You need to use MessageQ to go across cores.

    Judah