sdram: improve memtest by adding 2 different writes/reads
doing only a write and read is not enough: if we reloaded a fpga with write that is not working after functional fpga, it would not trigger an error.
This commit is contained in:
parent
46020fd253
commit
0980becb56
|
@ -422,7 +422,7 @@ int sdrlevel(void)
|
|||
|
||||
#endif /* DDRPHY_BASE */
|
||||
|
||||
#define TEST_SIZE (4*1024*1024)
|
||||
#define TEST_SIZE (2*1024*1024)
|
||||
|
||||
int memtest_silent(void)
|
||||
{
|
||||
|
@ -431,6 +431,15 @@ int memtest_silent(void)
|
|||
unsigned int prv;
|
||||
unsigned int error_cnt;
|
||||
|
||||
for(i=0;i<TEST_SIZE/4;i++) {
|
||||
array[i] = 0x5A5A5A5A;
|
||||
}
|
||||
error_cnt = 0;
|
||||
for(i=0;i<TEST_SIZE/4;i++) {
|
||||
if(array[i] != 0x5A5A5A5A)
|
||||
error_cnt++;
|
||||
}
|
||||
|
||||
prv = 0;
|
||||
for(i=0;i<TEST_SIZE/4;i++) {
|
||||
prv = 1664525*prv + 1013904223;
|
||||
|
|
Loading…
Reference in New Issue