mirror of https://github.com/m-labs/artiq.git
gateware/rt2wb: support combinatorial ack
This commit is contained in:
parent
1b08e65fa1
commit
f73228f248
|
@ -23,6 +23,9 @@ class RT2WB(Module):
|
||||||
|
|
||||||
active = Signal()
|
active = Signal()
|
||||||
self.sync.rio += [
|
self.sync.rio += [
|
||||||
|
If(active & wb.ack,
|
||||||
|
active.eq(0),
|
||||||
|
),
|
||||||
If(self.rtlink.o.stb,
|
If(self.rtlink.o.stb,
|
||||||
active.eq(1),
|
active.eq(1),
|
||||||
wb.adr.eq(self.rtlink.o.address[:address_width]),
|
wb.adr.eq(self.rtlink.o.address[:address_width]),
|
||||||
|
@ -30,15 +33,11 @@ class RT2WB(Module):
|
||||||
wb.dat_w.eq(self.rtlink.o.data),
|
wb.dat_w.eq(self.rtlink.o.data),
|
||||||
wb.sel.eq(2**len(wb.sel) - 1)
|
wb.sel.eq(2**len(wb.sel) - 1)
|
||||||
),
|
),
|
||||||
If(wb.ack,
|
|
||||||
active.eq(0)
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
self.comb += [
|
self.comb += [
|
||||||
self.rtlink.o.busy.eq(active),
|
self.rtlink.o.busy.eq(active & ~wb.ack),
|
||||||
wb.cyc.eq(active),
|
wb.cyc.eq(active),
|
||||||
wb.stb.eq(active),
|
wb.stb.eq(active),
|
||||||
|
|
||||||
self.rtlink.i.stb.eq(active & wb.ack & ~wb.we),
|
self.rtlink.i.stb.eq(active & wb.ack & ~wb.we),
|
||||||
self.rtlink.i.data.eq(wb.dat_r)
|
self.rtlink.i.data.eq(wb.dat_r)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue