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=3038fe73596d6e2d66b3100c4d365d4caab2dd81;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<