Handle stall signal.
[c4m-jtag.git] / rtl / nmigen / jtag.py
index 6a1c7ca65ac4b7c78fc1cfddd5d077db295c0ad6..a9e04b5ae6f0691879e4b781567203d8ae3e2f08 100755 (executable)
@@ -199,7 +199,8 @@ class JTAGWishbone(Elaboratable):
                     wb.stb.eq(1),
                     wb.we.eq(0),
                 ]
-                m.next = "READACK"
+                with m.If(~wb.stall):
+                    m.next = "READACK"
             with m.State("READACK"):
                 m.d.comb += [
                     wb.cyc.eq(1),
@@ -215,7 +216,8 @@ class JTAGWishbone(Elaboratable):
                     wb.stb.eq(1),
                     wb.we.eq(1),
                 ]
-                m.next = "WRITEREADACK"
+                with m.If(~wb.stall):
+                    m.next = "WRITEREADACK"
             with m.State("WRITEREADACK"):
                 m.d.comb += [
                     wb.cyc.eq(1),