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 Communication between cores having different .out files

Am trying to load X.out file in DSP_CORE0 and Y.out file in DSP_CORE1 - to test IPC communication . But the program get into indefinite run state in Ipc_attach().

But the code works fine incase of single .out file where code for each core is differentiated using an If statement. Ipc example program also denotes the same running procedure for IPC.

Is it possible to run different .out file in different core ?

Any additional change is required in the .cfg file ?

How to synchronize different core ?_-Synchronize core in group is not functioning ? 

  • Hi Vinodh,

    Please provide,

    1. Which version of MCSDK you are using
    2. Which processor and board platform (EVM & its revision) you are using
    3. If relevant, the version of your components
    4. If relevant, which version of the compiler and Code Composer Studio you are using

    Yes. It is possible to run different .out file in different core. If same out file is used across multiple cores, then DNUM shall be used to execute the core specific routines.

    Thank you.


     

  • MCSDK version : 2.2.1.03

    EVM:  6614

    IPC : ipc_1_25_03_15

    CCS : V5.5

    Compiler : c6000_7.4.4

    Is there any specific inclusion required in the .cfg file for IPC for different .out in different core ? How different is that from running the same .out file in different core ? What are the complexity involved?

  • Vinodh,

    Please see the IPC user guide to get the detailed information.
    C:\ti\ipc_1_xx_xx_xx\docs\IPC_Users_Guide
    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Inter-Processor_Communication_.28IPC.29

    For IPC sync, see this E2E post.

    http://e2e.ti.com/support/embedded/tirtos/f/355/p/107028/377493.aspx#377493

    http://e2e.ti.com/support/embedded/tirtos/f/355/p/271570/948708.aspx#948708

    If you are implementing MessageQ transport on your application code,refer the below E2E post. This is having detailed discussion.

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

  • Hi Pubesh , 

    We tried running with a common .out file - 

    Both the core is able to create a messageQ .But on running only core 0 is able to open and send the message to core1, whereas core1 is only able to create .  Core1 keep trying to open the MSGQ of core0.

    ROV shows core1 attach is false. We are using the Ipc.ProcSync_ALL , but still the core not getting attached on the IPC_start().

    Please find the .cfg file below 

    /* --COPYRIGHT--,BSD
     * Copyright (c) 2011, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     * --/COPYRIGHT--*/
    
    /* Benchmark Task */
    var Task = xdc.useModule('ti.sysbios.knl.Task'); 
    
    
    
    var Semaphore     = xdc.useModule('ti.sysbios.knl.Semaphore');
    Semaphore.supportsEvents = false;
    
    //var Agent = xdc.useModule('ti.sysbios.rta.Agent');
    //Agent.transport = Agent.Transport_STOP_MODE_ONLY;
     
    //var Load = xdc.useModule('ti.sysbios.utils.Load');
    //Load.hwiEnabled = false;
    //Load.swiEnabled = false; 
    //Load.taskEnabled = false;
    
    var System   = xdc.useModule('xdc.runtime.System');
    var Startup   =   xdc.useModule('xdc.runtime.Startup');
    var SysStd   = xdc.useModule('xdc.runtime.SysStd');
    System.SupportProxy = SysStd;
    
    System.extendedFormats = "%f";
    
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.clockEnabled = false;
    BIOS.heapSize = 0x8000;
    
    var Timestamp = xdc.useModule("xdc.runtime.Timestamp");
    
    
    
    var PlatformLib = xdc.loadPackage('ti.platform.evmtci6614');
    
    /* 
    ** Register an EVM Init handler with BIOS. This will initialize the hardware. BIOS calls before it starts. 
    **
    ** If debugging with CCS, then this function will execute as CCS loads it if the option in your 
    ** Target Configuration file (.ccxml) has the option set to execute all code before Main. That is the 
    ** default.
    */
    
    var cslSettings = xdc.useModule ('ti.csl.Settings');
    
    var cacheEnabled = true;  
    var cacheLineSize = 128;
    var procName = null;
    var procNameList = [];
    
    var Settings                = xdc.module('ti.sdo.ipc.family.Settings');
    var Cache                = xdc.useModule('ti.sysbios.family.c66.Cache');
    var MessageQ                = xdc.module('ti.sdo.ipc.MessageQ');
    var Notify                  = xdc.module('ti.sdo.ipc.Notify');
    var Ipc                     = xdc.useModule('ti.sdo.ipc.Ipc');
    Notify.SetupProxy           = xdc.module(Settings.getNotifySetupDelegate());
    MessageQ.SetupTransportProxy= xdc.module(Settings.getMessageQSetupDelegate());
    
    /* Use shared memory IPC */
    Notify.SetupProxy           = xdc.module('ti.sdo.ipc.family.c647x.NotifyCircSetup');
    MessageQ.SetupTransportProxy = xdc.module('ti.sdo.ipc.transports.TransportShmNotifySetup');
    
    /* Synchronize all processors (this will be done in Ipc_start) */
    Ipc.procSync = Ipc.ProcSync_ALL;
    
    /* Set to disable error printouts */
    /* var Error = xdc.useModule('xdc.runtime.Error'); */
    /* Error.raiseHook = null; */
    
    Program.global.NOTIFYSETUP = Notify.SetupProxy.delegate$.$name;
    Program.global.TRANSPORTSETUP = MessageQ.SetupTransportProxy.delegate$.$name;
    
    //switch (Program.platformName) {                                                                   
       // case "ti.platforms.evm6614":    
           // Program.global.USING_TCI6614 = 1;    
            //procNameList = ["CORE0", "CORE1"];
            //Program.global.shmBase = 0x0C000000;
            //Program.global.shmSize = 0x00050000; /* Sized for greater than 2000 128 byte messageQ messages */
          //  break;
        //default:
      //      throw("Unsupported platform: " + Program.platformName);
    //}
    		// procName = "CORE1";
            procNameList = ["CORE0","CORE1"];
    
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    MultiProc.setConfig(null, procNameList);
    
    Program.global.DEVICENAME = Program.cpu.deviceName;
    Program.global.PROCNAMES = procNameList.join(",");
    Program.global.BUILDPROFILE = Program.build.profile;
    
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    SharedRegion.translate = false;
    SharedRegion.setEntryMeta(0,
        { base: 0x0c000000,
          len: 0x00100000,
          ownerProcId: 0,
          isValid: true,
          cacheEnable: cacheEnabled,
          cacheLineSize: cacheLineSize,  /* Aligns allocated messages to a cache line */
          name: "internal_shared_mem",
        });
    
    
    /* Optimization stuff */
    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 Semaphore     = xdc.useModule('ti.sysbios.knl.Semaphore');
    Semaphore.supportsEvents = false;
    

  • Hi , 

    I resolved the issue : 

    Our initial assumption was  Ipc.ProcSync_ALL in .cfg will synchronize all the core automatically on IPC_START() .

    But attach was not successful in that case  . We tried using IPC_attach() if the entry is not of the ownerProcId and the core attach was happening successfully . 

     

    Now we are able to run different .out file in different core . 

  • Vinodh,

    Glad to hear, its working on your side. However this discussion of thread can helpful for future readers, If you verified this thread.