break out when core is stopped in HDLRunner
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 19 Dec 2021 15:03:55 +0000 (15:03 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 19 Dec 2021 15:03:55 +0000 (15:03 +0000)
should be using DMI status check but this is quick

src/soc/simple/test/test_runner.py

index 90d428bc5e35100fc2a8b95e549b784b07abd761..3f637059fe50fc278128d966f147c804bb80bc2c 100644 (file)
@@ -312,6 +312,14 @@ class HDLRunner(StateRunner):
                 yield from set_dmi(dmi, DBGCore.CTRL, 1 << DBGCtrl.STOP)
                 yield
                 yield
+                # hmm really should use DMI status check here but hey it's quick
+                while True:
+                    stopped = yield self.issuer.dbg.core_stop_o
+                    if stopped:
+                        break
+                    yield
+                break
+
 
             terminated = yield self.issuer.dbg.terminated_o
             print("terminated(2)", terminated)