Hi,
There appears to be something wrong in my setup of the DMAN3 and DSKT2 and the memory allocation configuration for my DMA buffer (see alloc code snippet) on the Netra EVM.
Using the Netra EVM, my configuration is as follows:
In the all_syslink.cfg file
var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
DSKT2.DARAM0 = "INT_HEAP";
DSKT2.DARAM1 = "INT_HEAP";
DSKT2.DARAM2 = "INT_HEAP";
DSKT2.SARAM0 = "INT_HEAP";
DSKT2.SARAM1 = "INT_HEAP";
DSKT2.SARAM2 = "INT_HEAP";
DSKT2.ESDATA = "EXTALG_HEAP";
DSKT2.EPROG = "EXTALG_HEAP";
DSKT2.IPROG = "INT_HEAP";
DSKT2.DSKT2_HEAP = "EXT_HEAP";
//DSKT2.ALLOW_EXTERNAL_SCRATCH = false;
//DSKT2.SARAM_SCRATCH_SIZES[0] = 64 * 1024; // 32k scratch for groupId 0
DSKT2.DARAM_SCRATCH_SIZES = [ 65536, 2048, 0,0,0,0,0, /* ... */ 0 ];
DSKT2.SARAM_SCRATCH_SIZES = [ 65536, 2048, 0,0,0,0,0, /* ... */ 0 ];
var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3');
DMAN3.heapInternal = "INT_HEAP";
DMAN3.heapExternal = "EXTALG_HEAP";
DMAN3.idma3Internal = false;
DMAN3.scratchAllocFxn = "DSKT2_allocScratch";
DMAN3.scratchFreeFxn = "DSKT2_freeScratch";
DMAN3.qdmaPaRamBase = 0x09004000;DMAN3.maxPaRamEntries = 512;
DMAN3.paRamBaseIndex = 129; // 1st EDMA3 PaRAM set available for DMAN3
DMAN3.numQdmaChannels = 6; // number of device's QDMA channels to use
DMAN3.qdmaChannels = [2,3,4,5,6,7]; // choice of QDMA channels to use
DMAN3.numPaRamEntries = 48; // number of PaRAM sets exclusively used by DMAN
DMAN3.nullPaRamIndex = 128;
DMAN3.numPaRamGroup[0] = 48; //number of PaRAM sets for scratch group 0
DMAN3.numTccGroup[0] = 22; //number of TCCs assigned to scratch group 0
DMAN3.tccAllocationMaskL = 0xFC00000F; // bit mask indicating which TCCs 0..31to use
DMAN3.tccAllocationMaskH = 0xFF0F0000; // assign all TCCs 32..63 for DMAN
var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
RMAN.useDSKT2 = true;
RMAN.tableSize = 10;
Then In the codec's alloc function, the dma buffer is allocated as:
memTab[6].size = DMA_BUFFER_TOTAL_SIZE;
memTab[6].alignment = 128;
memTab[6].space = IALG_EXTERNAL; //IALG_DARAM0; //IALG_SARAM;
memTab[6].attrs = IALG_SCRATCH;
Previously, when the DMA was working on our DaVinci device, it used to have the following configuration:
In the codec's alloc function:
memTab[6].size = DMA_BUFFER_TOTAL_SIZE;
memTab[6].alignment = 128;
memTab[6].space = IALG_DARAM0;
memTab[6].attrs = IALG_SCRATCH;
In the codec's cfg file:
var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
DSKT2.DARAM0 = "L1DSRAM";
DSKT2.DARAM1 = "L1DSRAM";
DSKT2.DARAM2 = "L1DSRAM";
DSKT2.SARAM0 = "L1DSRAM";
DSKT2.SARAM1 = "L1DSRAM";
DSKT2.SARAM2 = "L1DSRAM";
DSKT2.ESDATA = "DDRALGHEAP";
DSKT2.IPROG = "L1DSRAM";
DSKT2.EPROG = "DDRALGHEAP";
DSKT2.DSKT2_HEAP = "DDR";
DSKT2.debug = false;
DSKT2.DARAM_SCRATCH_SIZES = [ 65536, 2048, 0,0,0,0,0, /* ... */ 0 ];
DSKT2.SARAM_SCRATCH_SIZES = [ 65536, 2048, 0,0,0,0,0, /* ... */ 0 ];
var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3');
DMAN3.heapInternal = "L1DSRAM";
DMAN3.heapExternal = "DDRALGHEAP";
DMAN3.paRamBaseIndex = 78;
DMAN3.numQdmaChannels = 8;
DMAN3.qdmaChannels = [0,1,2,3,4,5,6,7];
DMAN3.numPaRamEntries = 48;
DMAN3.numPaRamGroup[0] = 48;
DMAN3.numTccGroup[0] = 8;
DMAN3.tccAllocationMaskL = 0;
DMAN3.tccAllocationMaskH = 0xffffffff;
DMAN3.idma3Internal = false;
DMAN3.scratchAllocFxn = "DSKT2_allocScratch";
DMAN3.scratchFreeFxn = "DSKT2_freeScratch";
DMAN3.debug = false;