test_lib_fifo: define all referenced FSM states.
authorwhitequark <whitequark@whitequark.org>
Thu, 6 Feb 2020 18:10:15 +0000 (18:10 +0000)
committerwhitequark <whitequark@whitequark.org>
Thu, 6 Feb 2020 18:10:15 +0000 (18:10 +0000)
Broken in commit a1c58633.

nmigen/test/test_lib_fifo.py

index 7682bc997076ba87614a397b3f81d93368c17178..38019f91d1aec875a9014afb53189e1971ee7e6e 100644 (file)
@@ -192,6 +192,8 @@ class FIFOContractSpec(Elaboratable):
                         fifo.w_en.eq(1)
                     ]
                     m.next = "DONE"
+            with m.State("DONE"):
+                pass
 
         with m.FSM(domain=self.r_domain) as read_fsm:
             read_1 = Signal(fifo.width)
@@ -209,6 +211,8 @@ class FIFOContractSpec(Elaboratable):
                     ]
                 with m.If((read_1 == entry_1) & (read_2 == entry_2)):
                     m.next = "DONE"
+            with m.State("DONE"):
+                pass
 
         with m.If(Initial()):
             m.d.comb += Assume(write_fsm.ongoing("WRITE-1"))