From: Luke Kenneth Casson Leighton Date: Sun, 19 Dec 2021 15:03:55 +0000 (+0000) Subject: break out when core is stopped in HDLRunner X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4551ed43212eea3be7767b3d369420b01f04f05d;p=soc.git break out when core is stopped in HDLRunner should be using DMI status check but this is quick --- diff --git a/src/soc/simple/test/test_runner.py b/src/soc/simple/test/test_runner.py index 90d428bc..3f637059 100644 --- a/src/soc/simple/test/test_runner.py +++ b/src/soc/simple/test/test_runner.py @@ -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)