We are running some experiments with SYS/BIOS and "NON-BIOS" projects under CCS4 with an EVMC6472 board.
#pragma DATA_SECTION(Ready_Flag, "SharedMem");
volatile int Ready_Flag;
Ready_Flag = 0;
int main() {
...
...
unsigned int *pL1DCFG = (unisgned int*)0x01840040;
unsigned int *pL1dINV = (unsigned int*)0x01845048;
*pL1DCFG = 0x7;
*pL1dINV = 0x1;
printf("Begin\n");
if (DNUM == 0) {
Ready_Flag = 1;
}
while (Ready_Flag != 1);
printf("Done\n");
...
...
}
This is the only user source file, and is identical in both projects.
In the code shown above, L1D cache is enabled by writing to the L1DCFG register. The expected output when the generated .out file is run on all 6 cores is, Cores 1-5 wait in the blocking while loop until Core 0 writes a value of 1 in Ready_Flag, after which all Cores print a "Done" message.
The SYS/BIOS project runs on 6 cores and it's output matches expected output. However when the NON-BIOS project is run on 6 cores, only Core 0 prints the "Done" message. Upon investigating further, we determined that this was due to incoherence in the Cache, i.e. if we disable L1D Caching, the NON-BIOS project also produces expected output. Hence it appears that SYS/BIOS handles Cache coherence in the background, and this is not done in the NON-BIOS project. Could someone point out which registers we might take a look at so as to enable Cache coherence management in hardware ?
Vikram.