diff --git a/litedram/core/multiplexer.py b/litedram/core/multiplexer.py index 2e8eb68..a580633 100644 --- a/litedram/core/multiplexer.py +++ b/litedram/core/multiplexer.py @@ -136,10 +136,10 @@ 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), + count.eq(txxd-1), If((txxd - 1) == 0, ready.eq(1) ).Else(