From 4551ed43212eea3be7767b3d369420b01f04f05d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 19 Dec 2021 15:03:55 +0000 Subject: [PATCH] break out when core is stopped in HDLRunner should be using DMI status check but this is quick --- src/soc/simple/test/test_runner.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.30.2