From cbbbb3f468da3d7fd89ed909b0bd58d5463ab8a0 Mon Sep 17 00:00:00 2001 From: Stephane Gourichon Date: Mon, 5 Oct 2020 18:40:24 +0200 Subject: [PATCH] Only display write speed if write test actually performed. --- litex/soc/software/libbase/memtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/soc/software/libbase/memtest.c b/litex/soc/software/libbase/memtest.c index 70ae84e46..625b46429 100644 --- a/litex/soc/software/libbase/memtest.c +++ b/litex/soc/software/libbase/memtest.c @@ -203,8 +203,8 @@ void memspeed(unsigned int *addr, unsigned long size, bool read_only) timer0_update_value_write(1); end = timer0_value_read(); write_speed = (size*(CONFIG_CLOCK_FREQUENCY/1000000))/(start - end); + printf(" Write: %ldMiB/s\n", write_speed); } - printf(" Write: %ldMiB/s\n", write_speed); /* flush CPU and L2 caches */ flush_cpu_dcache();