Copy the startup delay from issuer.py to inorder.py
authorCesar Strauss <cestrauss@gmail.com>
Sun, 6 Mar 2022 18:00:37 +0000 (15:00 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Sun, 6 Mar 2022 18:03:05 +0000 (15:03 -0300)
Fixes TestIssuerInternalInOrder hanging at startup.

src/soc/simple/inorder.py

index 8174fc5c0d067ee719744aeca721bf7df73a8d8c..03a101a45bf3d2fe54c94278dc3cd6b3a3d03263 100644 (file)
@@ -120,6 +120,12 @@ class FetchFSM(ControlBase):
 
         with m.FSM(name='fetch_fsm'):
 
+            # allow fetch to not run at startup due to I-Cache reset not
+            # having time to settle.  power-on-reset holds dbg.core_stopped_i
+            with m.State("PRE_IDLE"):
+                with m.If(~dbg.core_stopped_i & ~dbg.core_stop_o):
+                    m.next = "IDLE"
+
             # waiting (zzz)
             with m.State("IDLE"):
                 with m.If(~dbg.stopping_o & ~fetch_failed):