diff --git a/litex/soc/software/libbase/memtest.c b/litex/soc/software/libbase/memtest.c index 28a7d7e9d..09e15bf53 100644 --- a/litex/soc/software/libbase/memtest.c +++ b/litex/soc/software/libbase/memtest.c @@ -15,7 +15,7 @@ #define MIB (KIB*1024) #define GIB (MIB*1024) -#define ONEZERO 0xAAAAAAAA +#define ONEZERO 0xaaaaaaaa #define ZEROONE 0x55555555 #ifndef MEMTEST_BUS_SIZE @@ -47,36 +47,46 @@ int memtest_bus(unsigned int *addr, unsigned long size) errors = 0; - for(i = 0; i < size/4;i++) { + /* Write One/Zero pattern */ + for(i=0; i