Hi,
I have made some test on writing directly data in DDR3A, in my test I do quite a few writes in DDR3A that is cached (through MAR registers).
For the following information I gave, I use DDR3 controller performance counter on DSP core0, and I measure R/W accesses.
For 1048576 Bytes input uint32 data:
In no-optimized code (-o0), I have 262126 writes, that is for me logical (writing 4 Bytes by 4 Bytes).
In optimized code (-o3), only 36377 writes are counted by performance counter (I do not understand).
That makes sense ?
In my understanding of DDR3 controller documentation, the controller manage write command in its command FIFO and a scheduler send commands to SDRAM.
In a logic expectation, I was expecting for an input data, have a number of write acceses who correspound to: input data divided by sizeof(data), in my case 4 Bytes (uint32).
I put my test code in pseudo code:
table = @inDDR3A
test_size_bytes = 4;
do{
for(i=0; i <= test_size_bytes; i++){
table[i] = i;
}
test_size_bytes *=2;
}while (test_size_bytes < MAX_TEST_SIZE);
Regards,
François