common/TXXDcontroller: fix for compatibility with Yosys and vendor tools

This commit is contained in:
Florent Kermarrec 2019-03-04 12:48:42 +01:00
parent a74d5c9d9e
commit 4274db809e

View file

@ -165,13 +165,14 @@ def cmd_request_rw_layout(a, ba):
class tXXDController(Module): class tXXDController(Module):
def __init__(self, txxd): def __init__(self, txxd):
self.valid = valid = Signal() self.valid = valid = Signal()
self.ready = ready = Signal() self.ready = Signal()
ready.attr.add("no_retiming")
# # # # # #
self.comb += self.ready.eq(1) self.comb += self.ready.eq(1)
if txxd is not None: if txxd is not None:
ready = Signal()
ready.attr.add("no_retiming")
count = Signal(max=max(txxd, 2)) count = Signal(max=max(txxd, 2))
self.sync += \ self.sync += \
If(valid, If(valid,
@ -185,3 +186,4 @@ class tXXDController(Module):
count.eq(count - 1), count.eq(count - 1),
If(count == 1, ready.eq(1)) If(count == 1, ready.eq(1))
) )
self.comb += self.ready.eq(ready)