From 3ce74f6e296522b4b263459174fcb90a6f9edbc7 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 7 Dec 2020 13:23:58 +0100 Subject: [PATCH] software/libbase/memtest: cosmetic cleanups. --- litex/soc/software/libbase/memtest.c | 56 ++++++++++++++++++---------- 1 file changed, 37 insertions(+), 19 deletions(-) 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