diff --git a/litedram/core/multiplexer.py b/litedram/core/multiplexer.py index ba643a7..3a59395 100644 --- a/litedram/core/multiplexer.py +++ b/litedram/core/multiplexer.py @@ -125,10 +125,10 @@ class tXXDController(Module): # # # if txxd is not None: - count = Signal(max=max(txxd, 2)) + count = Signal(max=max(txxd+1, 2)) self.sync += \ If(valid, - count.eq(txxd - 1), + count.eq(txxd), If((txxd - 1) == 0, ready.eq(1) ).Else(