From: klehman Date: Sat, 25 Sep 2021 14:07:52 +0000 (-0400) Subject: change over run_hdl_state to TestRunner class X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f164672e4e03af1b63c51809f93bdc3d3be106ad;p=soc.git change over run_hdl_state to TestRunner class --- diff --git a/src/soc/simple/test/test_runner.py b/src/soc/simple/test/test_runner.py index c8c3e827..cb9abbd6 100644 --- a/src/soc/simple/test/test_runner.py +++ b/src/soc/simple/test/test_runner.py @@ -276,6 +276,108 @@ class HDLRunner(StateRunner): m.submodules.issuer = self.issuer self.dmi = self.issuer.dbg.dmi + def prepare_for_test(self, test): + self.test = test + + # set up bigendian (TODO: don't do this, use MSR) + yield self.issuer.core_bigendian_i.eq(bigendian) + yield Settle() + + yield + yield + yield + yield + + def setup_during_test(self): + yield from set_dmi(self.dmi, DBGCore.CTRL, 1<= len(instructions): + print ("index over, send dmi stop") + # stop at end + yield from set_dmi(dmi, DBGCore.CTRL, + 1<