Handle stall signal.
authorStaf Verhaegen <staf@stafverhaegen.be>
Fri, 6 Dec 2019 16:09:26 +0000 (17:09 +0100)
committerStaf Verhaegen <staf@stafverhaegen.be>
Fri, 6 Dec 2019 17:32:47 +0000 (18:32 +0100)
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),