Use Elif for third m.next assignment.
authorStaf Verhaegen <staf@stafverhaegen.be>
Fri, 6 Dec 2019 19:06:06 +0000 (20:06 +0100)
committerStaf Verhaegen <staf@stafverhaegen.be>
Fri, 6 Dec 2019 19:15:45 +0000 (20:15 +0100)
This way m.next assignments are done in one If/Elif statements for
the "IDLE" state and not in two different If statements.

c4m/nmigen/jtag/tap.py

index f978254ead66b1ce04a7d9666ad48bcf8099067c..333105d1b488d044791a97b8db38e8998e8008b5 100755 (executable)
@@ -321,8 +321,7 @@ class TAP(Elaboratable):
                         # If data is
                         m.d[domain] += wb.adr.eq(wb.adr + 1)
                         m.next = "READ"
-
-                    with m.If(sr_data.oe[1]): # WBWRITE code
+                    with m.Elif(sr_data.oe[1]): # WBWRITE code
                         m.d[domain] += wb.dat_w.eq(sr_data.o)
                         m.next = "WRITEREAD"
                 with m.State("READ"):