Merge pull request #36 from JohnSully/timing_1

Fix failing timing
This commit is contained in:
enjoy-digital 2018-09-08 13:17:26 +02:00 committed by GitHub
commit d9c243037a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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