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.

Change IPC's notify setup delegates in Codec Engine

I have written a codec based on UNIVERSAL model, using Codec Engine package. I'm working on a DM816x processor: Cortex A8 calls the UNIVERSAL codec, which runs on the DSP side. I see that switching latencies from one core to the other, during UNIVERSAL call, are quite high (~130usec). I read on the IPC Users' Guide (par. 5.3.1) that it should be possible to improve IPC performances changing the notify driver.

In the examples provided, the tipical configuration is

/* IPC-related config */
xdc.useModule('ti.sdo.ce.ipc.dsplink.dsp.Settings');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var settings = xdc.useModule('ti.sdo.ipc.family.Settings');
var procNames = settings.getDeviceProcNames();
MultiProc.setConfig("DSP", procNames);

but in 'ti.sdo.ipc.family.Settings' the default notify driver is NotifyDriverSHM. Is it possibile (and how) to change it into ti.sdo.ipc.family.ti81xx.NotifyDriverMbx, for instance?

Thank you

Regards

  • Hi,

    Yes, its possible to do this but doing something like the below in your *.cfg file.  I would get everything working as it is first before doing this optimization:

    Be sure that if you do this optimization, you need to do it for all processors which is going to be running IPC.

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

    Notify.SetupProxy   = xdc.module('ti.sdo.ipc.family.ti81xx.NotifyMbxSetup');
    MessageQ.SetupTransportProxy = xdc.module('ti.sdo.ipc.transports.TransportShmNotifySetup');

    Judah

  • Hi,

    thank you. if I understand, my configuration should be as follows, in the .cfg file of the codec server (DSP side):

    xdc.useModule('ti.sdo.ce.ipc.dsplink.dsp.Settings');
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    var settings = xdc.useModule('ti.sdo.ipc.family.Settings');
    var procNames = settings.getDeviceProcNames();

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

    Notify.SetupProxy   = xdc.module('ti.sdo.ipc.family.ti81xx.NotifyMbxSetup');
    MessageQ.SetupTransportProxy = xdc.module('ti.sdo.ipc.transports.TransportShmNotifySetup');

    MultiProc.setConfig("DSP", procNames);

    But launching the server, I get the following output on the Cortex side:

    *** TransportShmSetup_attach: TransportShm_openByAddr failed Error [0xfffffffb] at Line no: 180 in file /home/francesco/q7bsp/component-sources/syslink_2_20_00_14/packages/ti/syslink/utils/hlos/knl/Linux/../../ ../../../../ti/syslink/ipc/hlos/knl/transports/TransportShmSetup.c *** Ipc_attach: Notify_attach failed! Error [0xffffffff] at Line no: 540 in file /home/francesco/q7bsp/component-sources/syslink_2_20_00_14/packages/ti/syslink/utils/hlos/knl/Linux/../../ ../../../../ti/syslink/ipc/hlos/knl/Ipc.c *** Ipc_readConfig: Ipc not attached! Error [0xfffffff9] at Line no: 1166 in file /home/francesco/q7bsp/component-sources/syslink_2_20_00_14/packages/ti/syslink/utils/hlos/knl/Linux/../.. /../../../../ti/syslink/ipc/hlos/knl/Ipc.c Assertion at Line no: 2879 in /home/francesco/q7bsp/component-sources/syslink_2_20_00_14/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslin k/family/hlos/knl/ti81xx/Platform.c: ( Platform_module->hostModuleConfig.sharedRegionNumEntries == slaveModuleConfig.sharedRegionNumEntries) : failed *** Platform_startCallback: SharedRegion numEntries did not match with slave side Error [0xffffffff] at Line no: 2889 in file /home/francesco/q7bsp/component-sources/syslink_2_20_00_14/packages/ti/syslink/utils/hlos/knl/Linux/../.. /../../../../ti/syslink/family/hlos/knl/ti81xx/Platform.c *** Ipc_control: Platform_startCallback failed! Error [0xffffffff] at Line no: 853 in file /home/francesco/q7bsp/component-sources/syslink_2_20_00_14/packages/ti/syslink/utils/hlos/knl/Linux/../../ ../../../../ti/syslink/ipc/hlos/knl/Ipc.c

    Perhaps I have to configure something also on the Cortex side, but I don't know where, since in Codec Engine's architecture there's a .cfg file only on DSP-side.

    Regards

    Francesco

  • Hi Francesco,

    See http://processors.wiki.ti.com/index.php/SysLink_Notify_Drivers_and_Transports for an overview on how to change the Notify driver. Basically in addition to what you have done, you will also need to change a build flag in SysLink (the ARM-side equivalent of IPC) and rebuild it. Note that you need to upgrade to SysLink 2.20.01.18 at a minimum for this feature to be supported, and if you use any binaries from the SDK for the video subsystem that are based on SysLink, they will need to be rebuilt against the new SysLink libraries as well. The whole system needs to be using the same notify driver.

    Best regards,

    Vincent

  • Hi Vincent,

    following your informations I succeeded in installing and testing NotifyDriverCirc and TransportShmNotify.

    Only one thing. Is it possibile to use ti.sdo.ipc.family.ti81xx.NotifyDriverMbx? I have tried: the build os OK, but when I launch the application, it blocks without errors. I see that on IPC side, NotifyDriverMbx is supported, but I can't figure out what value I have to assign to SYSLINK_NOTIFYDRIVER on syslink side: it seems that only NOTIFYDRIVERSHM and NOTIFYDRIVERCIRC are supported.

    Thank you

    Regards

  • Hi Francesco,

    SysLink currently does not have support for NotifyDriverMbx. You are correct that only NotifyDriverShm and NotifyDriverCirc are supported.

    Best regards,

    Vincent