From 06c8c2afcf1e3c6cff1f7f2f38e6d9b352220055 Mon Sep 17 00:00:00 2001 From: John Sully Date: Sun, 23 Sep 2018 11:32:49 +0200 Subject: [PATCH] The actual fix --- litedram/core/multiplexer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litedram/core/multiplexer.py b/litedram/core/multiplexer.py index 10f69b4..a580633 100644 --- a/litedram/core/multiplexer.py +++ b/litedram/core/multiplexer.py @@ -136,11 +136,11 @@ class tXXDController(Module): # # # if txxd is not None: - count = Signal(max=max(txxd+1, 2)) + count = Signal(max=max(txxd, 2)) self.sync += \ If(valid, - count.eq(txxd), - If((txxd) == 0, + count.eq(txxd-1), + If((txxd - 1) == 0, ready.eq(1) ).Else( ready.eq(0)