diff --git a/litedram/frontend/wishbone.py b/litedram/frontend/wishbone.py index a8f8e82..05eb468 100644 --- a/litedram/frontend/wishbone.py +++ b/litedram/frontend/wishbone.py @@ -28,16 +28,16 @@ class LiteDRAMWishbone2Native(Module): [("data", port_data_width), ("we", port_data_width//8)], ) self.submodules += wdata_converter - wdata_lock = Signal() + wdata_complete = Signal() self.comb += [ - wdata_converter.sink.valid.eq(wishbone.cyc & wishbone.stb & wishbone.we & ~wdata_lock), + wdata_converter.sink.valid.eq(wishbone.cyc & wishbone.stb & wishbone.we & ~wdata_complete), wdata_converter.sink.data.eq(wishbone.dat_w), wdata_converter.sink.we.eq(wishbone.sel), wdata_converter.source.connect(port.wdata) ] self.sync += [ If(wdata_converter.sink.valid & wdata_converter.sink.ready, - wdata_lock.eq(1) + wdata_complete.eq(1) ) ] @@ -75,9 +75,9 @@ class LiteDRAMWishbone2Native(Module): ) ) fsm.act("WAIT-WRITE", - If(wdata_converter.sink.ready, - NextValue(wdata_lock, 0), - wishbone.ack.eq(1), + If(wdata_complete, + wishbone.ack.eq(1), + NextValue(wdata_complete, 0), NextState("CMD") ) )