From 6755c8438f8233b03aecf2f0bcd6081c24a755d6 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 28 Apr 2021 17:55:18 +0200 Subject: [PATCH] frontend/wishbone: Fix refactoring typos (thanks jfng). --- litedram/frontend/wishbone.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litedram/frontend/wishbone.py b/litedram/frontend/wishbone.py index dc9abc5..dc6062c 100644 --- a/litedram/frontend/wishbone.py +++ b/litedram/frontend/wishbone.py @@ -56,7 +56,7 @@ class LiteDRAMWishbone2Native(Module): ) self.comb += [ port.wdata.valid.eq(wishbone.stb & wishbone.we), - If(ratio < 1, If(~fsm.ongoing("WRITE"), port.wdata.valid.eq(0))), + If(ratio <= 1, If(~fsm.ongoing("WRITE"), port.wdata.valid.eq(0))), port.wdata.data.eq(wishbone.dat_w), port.wdata.we.eq(wishbone.sel), ] @@ -69,9 +69,9 @@ class LiteDRAMWishbone2Native(Module): ) self.comb += port.rdata.ready.eq(1) fsm.act("READ", - NextValue(aborted, aborted | ~wishbone.cyc), + NextValue(aborted, ~wishbone.cyc | aborted), If(port.rdata.valid, - wishbone.ack.eq(~aborted | wishbone.cyc), + wishbone.ack.eq(wishbone.cyc & ~aborted), wishbone.dat_r.eq(port.rdata.data), NextState("CMD") )