software/libbase/memtest: fix bus errors reporting.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 29 Jun 2020 07:51:34 +0000 (09:51 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 29 Jun 2020 14:46:03 +0000 (16:46 +0200)
litex/soc/software/libbase/memtest.c

index 80f5cf4659e622e5917451bf01d0975d1d5d0a7e..9ab59f90c5941bf01b54256e54b04860ef18def9 100644 (file)
@@ -228,7 +228,7 @@ int memtest(unsigned int *addr, unsigned long maxsize)
        data_errors = memtest_data(addr, data_size, MEMTEST_DATA_RANDOM);
 
        if(bus_errors + addr_errors + data_errors != 0) {
-               printf("- bus errors:  %d/%d\n", bus_errors,  bus_size/4);
+               printf("- bus errors:  %d/%d\n", bus_errors,  2*bus_size/4);
                printf("- addr errors: %d/%d\n", addr_errors, addr_size/4);
                printf("- data errors: %d/%d\n", data_errors, data_size/4);
                printf("Memtest KO\n");