From 031746a53c5f7100feeb2e3f816372844e0b3502 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 18 Jan 2019 17:56:32 +0100 Subject: [PATCH] frontend/bist: fix for data_width < 31 (16 bits SDRAMs) --- litedram/frontend/bist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litedram/frontend/bist.py b/litedram/frontend/bist.py index f33629d..341271d 100644 --- a/litedram/frontend/bist.py +++ b/litedram/frontend/bist.py @@ -337,12 +337,13 @@ class _LiteDRAMBISTChecker(Module, AutoCSR): ), NextValue(self.ticks, 0) ) + data_fsm.act("RUN", dma.source.ready.eq(1), If(dma.source.valid, data_gen.ce.eq(1), NextValue(data_counter, data_counter + 1), - If(dma.source.data != data_gen.o, + If(dma.source.data != data_gen.o[:min(len(data_gen.o), dram_port.data_width)], NextValue(self.errors, self.errors + 1) ), If(data_counter == (self.length[ashift:] - 1),