Hi,
We are trying to bench mark DDR2 RAM write/read speeds using the C6748 LCDK. We are running a small program which directly writes into DDR2 and verifies the written data after writing is completed. Code snippet is as below.
What we observe is write to RAM is taking a very long time. In this below example we are trying to write the whole ram(256MB) with known data and then reading back and comparing with known data. Write times are very slow and in the order of 10's of seconds.
What can be the reason for this very low speed? We are using the C6748_LCDK gel file while generating the binary file.
Regards,
Manj
uint32_t verifyPattern(uint32_t in_begin_addr, uint32_t in_num_bytes)
{
uint32_t rtn = ERR_NO_ERROR;
uint32_t offset;
uint32_t *test_addr = (uint32_t *)in_begin_addr;
// write ram under test to all 5's.
for (offset = 0; offset < in_num_bytes; offset += sizeof(uint32_t))
{
*test_addr++ = 0x55555555;
}
// verify ram under test is 5's.
test_addr = (uint32_t *)in_begin_addr;
for (offset = 0; offset < in_num_bytes; offset += sizeof(uint32_t))
{
if (*test_addr++ != 0x55555555)
{
printf("data pattern (5) test failed at address: %08X\r\n", test_addr);
rtn = ERR_FAIL;
}
}
// write ram under test to all A's.
test_addr = (uint32_t *)in_begin_addr;
for (offset = 0; offset < in_num_bytes; offset += sizeof(uint32_t))
{
*test_addr++ = 0xAAAAAAAA;
}
// verify ram under test is A's.
test_addr = (uint32_t *)in_begin_addr;
for (offset = 0; offset < in_num_bytes; offset += sizeof(uint32_t))
{
if (*test_addr++ != 0xAAAAAAAA)
{
printf("data pattern (A) test failed at address: %08X\r\n", test_addr);
rtn = ERR_FAIL;
}
}
return (rtn);
}