From b69ecc9d4fb3a0926a617cb9c669b87808b55fdd Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 16 Apr 2021 23:47:15 +0100 Subject: [PATCH] single-cycle mode fix on wb "wen" signal, must hold fully until ACKed --- c4m/nmigen/jtag/tap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c4m/nmigen/jtag/tap.py b/c4m/nmigen/jtag/tap.py index 1cdc833..12902ee 100755 --- a/c4m/nmigen/jtag/tap.py +++ b/c4m/nmigen/jtag/tap.py @@ -789,6 +789,7 @@ class TAP(Elaboratable): if hasattr(wb, "stall"): m.d.comb += wb.stb.eq(fsm.ongoing("READ") | fsm.ongoing("WRITEREAD")) + m.d.comb += wb.we.eq(fsm.ongoing("WRITEREAD")) else: # non-stall is single-cycle (litex), must assert stb # until ack is sent @@ -796,7 +797,6 @@ class TAP(Elaboratable): fsm.ongoing("WRITEREAD") | fsm.ongoing("READACK") | fsm.ongoing("WRITEREADACK")) - m.d.comb += [ - wb.cyc.eq(~fsm.ongoing("IDLE")), - wb.we.eq(fsm.ongoing("WRITEREAD")), - ] + m.d.comb += wb.we.eq(fsm.ongoing("WRITEREAD") | + fsm.ongoing("WRITEREADACK")) + m.d.comb += wb.cyc.eq(~fsm.ongoing("IDLE")) -- 2.30.2