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 performance

Other Parts Discussed in Thread: TMS320C6678

Good afternoon!

For the C6678 was written 2 projects, the first I load on the core 0, the second - at the cores 1-5.

The core 1 is waiting for a new data in the shared memory area (they appear on average once every 15 microseconds), when new data core 1 sends Notifies to cores 2-5.

(That is, the second project is designed so that, depending on the number of the cores starts different Tasks).

Cores 2-5 process the data, copy them to DDR3 and send Notify on the core 0. On receipt Notify Core 0 stores the data in the flash memory.

Everything works perfectly!

 

Then 2 more projects have been created for the cores 6 and 7. It is no processing is performed. But they have already started the BIOS, as well as connected to the IPC.

Now cores 1-5 does not have time to process the data in 15 microseconds.

I tried to remove Notify in projects for cores 6 and 7 - everything works as before, good!

Everything works as before - tried to remove the CPI cores 6 and 7! But I need to synchronize the cores to each other ..

Anyone can tell you the reason for this slowing of the processor? How can it be solved?

Thank you!

 

Project 1 (core 0)

XDCtools v3.32.0.06

IPC v3.40.1.08

MCSDK v2.1.2.6

PDK TMS320C6678 v1.1.2.6

NDK v2.24.3.35

OpenMP BIOS v1.1.3.0.02

SYS/BIOS v6.45.0.20

UIA v2.0.3.43

XDAIS v7.24.0.04

 

Project 2 (cores 1-5)

XDCtools v3.32.0.06

EDMA LLD v2.11.5

IPC v3.40.1.08

MCSDK v2.1.2.6

PDK TMS320C6678 v1.1.2.6

SYS/BIOS v6.45.0.20

UIA v2.0.3.43

XDAIS v7.24.0.04

 

Project 3 and 4 (core 6 and core 7)

XDCtools v3.32.0.06

IPC v3.40.1.08

MCSDK v2.1.2.6

PDK TMS320C6678 v1.1.2.6

SYS/BIOS v6.45.0.20

UIA v2.0.3.43

XDAIS v7.24.0.04

 

Shared Memory:

Core 0 uses “MSMCSRAM_MASTER”

Cores 1-5 use “MSMCSRAM_SLAVE”

Core 6 uses “MSMCSRAM_for_core6”

Core 7 uses “MSMCSRAM_for_core7”

Cfg-file:

var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Error = xdc.useModule('xdc.runtime.Error');
var Log = xdc.useModule('xdc.runtime.Log');
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory')
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
var Text = xdc.useModule('xdc.runtime.Text');

var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var BiosCache = xdc.useModule('ti.sysbios.hal.Cache');
var HeapBuf   = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var HeapMem   = xdc.useModule('ti.sysbios.heaps.HeapMem');
var Exc       = xdc.useModule('ti.sysbios.family.c64p.Exception');
var Cache     = xdc.useModule('ti.sysbios.family.c66.Cache');
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var Timer = xdc.useModule('ti.sysbios.hal.Timer');
var Seconds = xdc.useModule('ti.sysbios.hal.Seconds');

var PlatformLib  = xdc.loadPackage('ti.platform.evmc6678l');

/* Load and use the PCIE packages */
var Pcie = xdc.loadPackage('ti.drv.pcie'); 

/*use CSL package*/
var cslSettings = xdc.useModule ('ti.csl.Settings');

System.maxAtexitHandlers = 4;       

/*
 * Build a custom SYS/BIOS library from sources.
 */
BIOS.libType = BIOS.LibType_Custom;

/* System stack size (used by ISRs and Swis) */
Program.stack = 0x2000;

/* Circular buffer size for System_printf() */
SysMin.bufSize = 0x200;

/* 
 * Create and install logger for the whole system
 */
var loggerBufParams = new LoggerBuf.Params();
loggerBufParams.numEntries = 16;
var logger0 = LoggerBuf.create(loggerBufParams);
Defaults.common$.logger = logger0;
Main.common$.diags_INFO = Diags.ALWAYS_ON;

System.SupportProxy = SysMin;

/* Load and configure the IPC packages */
var Notify      = xdc.useModule('ti.sdo.ipc.Notify');
var MessageQ     = xdc.useModule('ti.sdo.ipc.MessageQ');
var Ipc          = xdc.useModule('ti.sdo.ipc.Ipc');
var HeapBufMP    = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
var MultiProc    = xdc.useModule('ti.sdo.utils.MultiProc');

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

var EC = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
var cpintc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');

var HCache = xdc.useModule('ti.sysbios.hal.Cache');
var C64_Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var Cache = xdc.useModule('xdc.runtime.knl.Cache');
Cache.Proxy = xdc.useModule('ti.sysbios.xdcruntime.CacheSupport');

EC.eventGroupHwiNum[0] = 7;
EC.eventGroupHwiNum[1] = 8;
EC.eventGroupHwiNum[2] = 9;
EC.eventGroupHwiNum[3] = 10;

/* Create a Heap. */
var heapMemParams = new HeapMem.Params;
heapMemParams.size = 0x8000;
var heap0 = HeapMem.create(heapMemParams);
Memory.defaultHeapInstance = heap0;

MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7"]);

/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;

/* Shared Memory base address and length */
var SHAREDMEM           = 0x0c100000;
var SHAREDMEMSIZE       = 0x00100000;

SharedRegion.setEntryMeta(0,
    { base: SHAREDMEM, 
      len:  SHAREDMEMSIZE,
      ownerProcId: 0,
      isValid: true,
      name: "MSMCSRAM_IPC",
    });
Memory.defaultHeapSize = 0x10000;
Program.heap = 0x10000;

/* ================ Logger configuration ================ */
//var LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');
var Diags         = xdc.useModule('xdc.runtime.Diags');
var Defaults      = xdc.useModule('xdc.runtime.Defaults');
var Main          = xdc.useModule('xdc.runtime.Main');
var Load          = xdc.useModule('ti.sysbios.utils.Load');

Load.windowInMs = 50;
CpuTimestamp     = xdc.useModule('ti.uia.family.c66.TimestampC66XLocal');
GlobalTimestamp = xdc.useModule('ti.uia.family.c66.TimestampC66XGlobal');

CpuTimestamp.maxTimerClockFreq = {lo:1000000000,hi:0};
CpuTimestamp.maxBusClockFreq = {lo:1000000000,hi:0};
GlobalTimestamp.maxTimerClockFreq = {lo:250000000,hi:0};
GlobalTimestamp.maxBusClockFreq = {lo:1000000000,hi:0};
GlobalTimestamp.cpuCyclesPerTick = 4;

var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
/* Increase the sysbios logger and turn Hwi and Swi logging off */
LoggingSetup.sysbiosLoggerSize = 32768;
LoggingSetup.mainLoggerSize = 8*1024;
LoggingSetup.loadLoggerSize = 32768;
LoggingSetup.loadLogging = true;
LoggingSetup.sysbiosTaskLogging = false;
LoggingSetup.sysbiosSwiLogging = false;
LoggingSetup.sysbiosHwiLogging = false;
LoggingSetup.overflowLoggerSize = 0;
LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;

Exc.common$.logger = Main.common$.logger;
Exc.enablePrint = true;

/* The application is using the UIA benchmark events. */ 
var UIABenchmark  = xdc.useModule('ti.uia.events.UIABenchmark');

Program.sectMap[".vecs"]   = {loadSegment: "MSMCSRAM_core6", loadAlign:1024};
Program.sectMap[".switch"] = {loadSegment: "MSMCSRAM_core6", loadAlign:8};
Program.sectMap[".cio"]    = {loadSegment: "L2SRAM", loadAlign:8};
Program.sectMap[".args"]   = {loadSegment: "L2SRAM", loadAlign:8};

Program.sectMap[".cinit"]               = "MSMCSRAM_core6";
Program.sectMap[".const"]               = "MSMCSRAM_core6";
Program.sectMap[".text"]                = "MSMCSRAM_core6";
Program.sectMap["systemHeap"]           = "L2SRAM";
Program.sectMap[".far"]                 = "L2SRAM";
Program.sectMap[".bss"]                 = "L2SRAM";
Program.sectMap[".rodata"]              = "L2SRAM";
Program.sectMap[".neardata"]            = "L2SRAM";
Program.sectMap[".code"]                = "L2SRAM";
Program.sectMap[".data"]                = "L2SRAM";
Program.sectMap[".sysmem"]              = "L2SRAM";
Program.sectMap[".defaultStackSection"] = "L2SRAM";
Program.sectMap[".stack"]               = "L2SRAM";
Program.sectMap[".plt"]                 = "L2SRAM";
Program.sectMap["platform_lib"]         = "L2SRAM";
Task.defaultStackSize = 8192;