The actual fix

This commit is contained in:
John Sully 2018-09-23 11:32:49 +02:00
parent e22580f9bd
commit 06c8c2afcf

View file

@ -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)