26 Bytes (6.5 regs)
(8 + 4*noOfBuffers) Bytes
Strucutre to store the configurable parameters for the Pru Ipc Instance
5 bytes
blockSize | Number of data packets per Block |
noOfBlocks | Number of Blocks per Buffer |
noOfBuffers | Maximum Number of Active Buffers |
dataSize | Size of the data packets |
Strucutre to store the iterators for the Pru Ipc Instance
9 bytes
packet | To track data packet index |
block | To track block index |
buffer | To track buffer index |
idxInBlock | To track index inside blocks |
Strucutre to store temporary registers for the Pru Ipc Instance
6 bytes
bufferBaseAddr | Stores base address for buffer buffers |
bufferOffset | Stores memory offset for TMP.bufferBaseAddr |
Initialization code when the Pru Ipc is started
PEAK cycles: 11 cycle
None
Pseudo code:
memcpy(offset(dataSize), PRU_IPC_CONFIG_MEM + DATASIZE_OFFSET, 1);
memcpy(offset(CFG.blockSize), PRU_IPC_CONFIG_MEM + BLOCKSIZE_OFFSET, 4);
ITR = 0;
dataSize | Size of the data packets Returns: None |
Sends the ADC data packets to the shared memory for each Buffer Creates interrupt event for r5f core to read data packets. Resets ITR.packet, ITR.block if they oveflow their maximum value
PEAK cycles: (15 + 10*noOfBuffers) cycle
None
Pseudo code:
for (ITR.buffer = 0, TMP.bufferOffset = BUFFERBASE_OFFSET;
ITR.buffer < CFG.noOfBuffers;
ITR.buffer++, TMP.bufferOffset+=4) {
dataReg = *dataRegBaseAddr++;
memcpy(offset(TMP.bufferBaseAddr), PRU_IPC_CONFIG_MEM + TMP.bufferOffset, 4);
if (TMP.bufferBaseAddr == 0) continue;
memcpy(offset(dataReg), TMP.bufferBaseAddr + ITR.packet, dataSize);
}
ITR.packet += dataSize;
ITR.idxInBlock++;