From f164672e4e03af1b63c51809f93bdc3d3be106ad Mon Sep 17 00:00:00 2001 From: klehman Date: Sat, 25 Sep 2021 10:07:52 -0400 Subject: [PATCH] change over run_hdl_state to TestRunner class --- src/soc/simple/test/test_runner.py | 122 +++++++++++++++++++++++++---- 1 file changed, 107 insertions(+), 15 deletions(-) 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<