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.

C6678 Loop buffer exception

Other Parts Discussed in Thread: SYSBIOS

Hello,

I have an  "Loop buffer exception" issue. My own program use System Analyzer for collect statistics. When I run it with system analyzer tool it crash after a few seconds with the following error:

[C66xx_0] 3750
A16=0xcd00cd A17=0x19a019a
A18=0xcdcdcdcd A19=0xcd00cd
A20=0x19c019c A21=0xcd00cd
A22=0x1616 A23=0x80f020
A24=0x16161616 A25=0x80f018
A26=0x48 A27=0x1980198
A28=0x40004 A29=0x20002
A30=0x0 A31=0x0
B0=0x0 B1=0x0
B2=0x2020202 B3=0xc150ff8
B4=0xcdcdcdcd B5=0xcd00cd
B6=0x0 B7=0xffffffff
B8=0xcd00cd B9=0xcd00cd
B10=0x848358 B11=0x823740
B12=0x848488 B13=0xc1a85dc
B14=0x876c78 B15=0x848300
B16=0x80dc30 B17=0x19a019a
B18=0x80dc34 B19=0xf
B20=0xcdcdcdcd B21=0x0
B22=0x20002 B23=0x707
B24=0x80dc38 B25=0x7070707
B26=0x80dc30 B27=0x3320332
B28=0xcc00cc B29=0xcc00cc
B30=0xcc00cc B31=0xcc00cc
NTSR=0x1420d
ITSR=0x20d
IRP=0xc15be6c
SSR=0x0
AMR=0x0
RILC=0x8
ILC=0x0
Exception at 0xc189f48
EFR=0x2 NRP=0xc189f48
Internal exception: IERR=0x180
Loop buffer exception
Missed stall exception
ti.sysbios.family.c64p.Exception: line 255: E_exceptionMin: pc = 0x0c189f48, sp = 0x00848300.
To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
xdc.runtime.Error.raise: terminating execution

There is my cfg file:

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 Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Error = xdc.useModule('xdc.runtime.Error');
var ti_csl_Settings = xdc.useModule('ti.csl.Settings');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var Exception=xdc.useModule('ti.sysbios.family.c64p.Exception');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
var H264HPVENC = xdc.useModule('ti.sdo.codecs.h264hpvenc.H264HPVENC');
var ECPY = xdc.useModule('ti.sdo.fc.ecpy.ECPY');
var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
var ti_platform_evmc6678l_Settings = xdc.useModule('ti.platform.evmc6678l.Settings');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
var Load = xdc.useModule('ti.sysbios.utils.Load');
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var NameServer = xdc.useModule('ti.sdo.utils.NameServer');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
var Settings = xdc.useModule('ti.drv.pcie.Settings');
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
Idle.idleFxns[0] = "&idle_check_frame";
var heapMemParams1 = new HeapMem.Params();
var heapMemParams2 = new HeapMem.Params();

Program.global.APPNUM = -1;
Program.global.shmSL2Base = 0x0C000000;
Program.global.shmSL2Size = 0x80000;

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

Exception.enablePrint=true;

heapMemParams1.size = 0xA000000;
heapMemParams1.sectionName=".extData";
Program.global.ddr3Heap=HeapMem.create(heapMemParams1);

heapMemParams2.size = 0x8000;
heapMemParams2.sectionName=".INTMEM_HEAP";
Program.global.INTMEM_HEAP=HeapMem.create(heapMemParams2);

for(var i=0;i<8;i++){
	Ipc.setEntryMeta({remoteProcId:i,
					  setupMessageQ:false,
					  });
}							 

SharedRegion.translate=false;
SharedRegion.setEntryMeta(0,{base: Program.global.shmSL2Base,
							 len: Program.global.shmSL2Size,
							 ownerProcId:0,
							 isValid: true,
							 cacheEnable:true,
							 cacheLineSize:64,
							 name: "ipc_internal_shm",
							 });



//var Engine = xdc.useModule('ti.sdo.ce.Engine');

/* 
 * Program.argSize sets the size of the .args section. 
 * The examples don't use command line args so argSize is set to 0.
 */
 
var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN');
var META = xdc.useModule('ti.sdo.fc.edma3.Settings');
var EDMA3LLD = xdc.loadPackage('ti.sdo.edma3.rm');


RMAN.useDSKT2 = true;
RMAN.yieldSamePriority = true;
RMAN.tableSize = 10;
//RMAN.maxAlgs = 2;

META.maxPaRams[0] =  42;
META.maxTccs[0] = 8;
META.maxEdmaChannels[0] = 8;
META.maxQdmaChannels[0] = 0;
META.controllerId=1;

DSKT2.ALLOW_EXTERNAL_SCRATCH = false;

DSKT2.DARAM0 = "INTMEM_HEAP";
DSKT2.DARAM1 = "INTMEM_HEAP";
DSKT2.DARAM2 = "INTMEM_HEAP";

DSKT2.SARAM0 = "INTMEM_HEAP";
DSKT2.SARAM1 = "INTMEM_HEAP";
DSKT2.SARAM2 = "INTMEM_HEAP";

DSKT2.ESDATA = "INTMEM_HEAP";
DSKT2.IPROG  = "INTMEM_HEAP";
DSKT2.EPROG  = "INTMEM_HEAP";

DSKT2.DSKT2_HEAP = "INTMEM_HEAP";

ECPY.persistentAllocFxn = "DSKT2_allocPersistent";
ECPY.persistentFreeFxn = "DSKT2_freePersistent"
 
BIOS.heapSize    = 0xC000;


Program.stack   = 0x3000;
Program.argSize = 0x800;

Program.sectMap[".chip_memory"]="MSMCSRAM";
Program.sectMap[".core_memory"]="L2SRAM";
Program.sectMap[".INTMEM_HEAP"]="L2SRAM";
Program.sectMap[".extData"]="DDR3";
Program.sectMap[".extData"].type="NOINT";
Program.sectMap[".extFrameData"]="DDR3";
Program.sectMap[".extFrameData"].type="NOINT";
Program.sectMap[".intFrameData"]="MSMCSRAM";
Program.sectMap[".intFrameData"].type="NOINT";
Program.sectMap[".intData"]="L2SRAM";
Program.sectMap[".intData"].type="NOINT";
Program.sectMap[".cabactables"]="MSMCSRAM";
Program.sectMap[".constTables"]="MSMCSRAM";
Program.sectMap[".qpTable_shared_dtcm2"]="MSMCSRAM";

Program.sectMap[".text"]   = "MSMCSRAM";
Program.sectMap[".text:cabac"] = "MSMCSRAM";
Program.sectMap[".stack"]  = "L2SRAM";
Program.sectMap[".cinit"]  = "MSMCSRAM";
Program.sectMap[".cio"]    = "L2SRAM";
Program.sectMap[".const"]  = "MSMCSRAM";
Program.sectMap[".qpTable_shared_dtcm2"]  = "MSMCSRAM";
Program.sectMap[".switch"] = "L2SRAM";
Program.sectMap[".args"]   = "MSMCSRAM";
Program.sectMap[".bss"]    = "L2SRAM";
Program.sectMap[".bios"]   = "L2SRAM";
Program.sectMap[".fardata"] = "L2SRAM";
Program.sectMap[".neardata"] = "L2SRAM";
Program.sectMap[".rodata"]   = "L2SRAM";
Program.sectMap[".tables"] = "DDR3";
Program.sectMap[".cabactables"] = "MSMCSRAM";
Program.sectMap[".sysmem"] = "L2SRAM";
Program.sectMap[".far"] = "L2SRAM";

SysMin.bufSize = 0x400;

System.SupportProxy = SysMin;

var Settings = xdc.useModule('ti.drv.pcie.Settings');
 
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var loggerCircBuf3Params = new LoggerCircBuf.Params();
loggerCircBuf3Params.instance.name = "loggerCircBuf3";
Program.global.loggerCircBuf3 = LoggerCircBuf.create(loggerCircBuf3Params);
LoggingSetup.mainLogger = Program.global.loggerCircBuf3;
LoggingSetup.sysbiosLogger = Program.global.loggerCircBuf3;

BIOS.cpuFreq.lo = 1250000000;

Could you explain what can lead to this?

With best Regards, Ilya.

  • Ilya,

    The value of NRP is the address where the exception was detected. Start by looking at this address to determine what the program code is and where this code fits in your application. Is it SYS/BIOS, some library function, your own C code, your own assembly code. You may want to refer to your linker .map file (in the same folder as the .out file) to quickly find the software module that contains this address.

    Loop buffer means SPLOOP buffer, so the instruction at NRP is probably involved with an SPLOOP. Look closely at that SPLOOP code to see what might be failing. You might set a breakpoint at the instruction just before the SPLOOP instruction and then single-step into it to see exactly what is going wrong.

    Please let us know what you find.

    Regards,
    RandyP