class TestIssuer(Elaboratable):
def __init__(self, pspec):
self.ti = TestIssuerInternal(pspec)
- # XXX TODO: make this a command-line selectable option from pspec
- #from soc.simple.inorder import TestIssuerInternalInOrder
- #self.ti = TestIssuerInternalInOrder(pspec)
self.pll = DummyPLL(instance=True)
self.dbg_rst_i = Signal(reset_less=True)
allow_overlap = True
del sys.argv[1]
+ # use in-order issuer, instead of the original FSM based one
+ inorder = False
+ if len(sys.argv) >= 2 and sys.argv[1] == '--inorder':
+ inorder = True
+ del sys.argv[1]
+
# allow list of testing to be selected by command-line
testing = []
for i in reversed(range(1, len(sys.argv))):
'branch', 'div', 'mul', 'hazard']
print("SVP64 test mode enabled", svp64, "overlap",
- allow_overlap, "testing", testing)
+ allow_overlap, "in-order", inorder, "testing", testing)
unittest.main(exit=False)
suite = unittest.TestSuite()
# walk through all tests, those requested get added
for tname, data in tests.items():
if tname in testing:
- suite.addTest(TestRunner(data, svp64=svp64,
+ suite.addTest(TestRunner(data, svp64=svp64, inorder=inorder,
allow_overlap=allow_overlap))
runner = unittest.TextTestRunner()
from openpower.endian import bigendian
from soc.simple.issuer import TestIssuerInternal
+from soc.simple.inorder import TestIssuerInternalInOrder
from soc.simple.test.test_core import (setup_regs, check_regs, check_mem,
wait_for_busy_clear,
self.svstate_i = Signal(64)
#hard_reset = Signal(reset_less=True)
- self.issuer = TestIssuerInternal(pspec)
+ if pspec.inorder:
+ self.issuer = TestIssuerInternalInOrder(pspec)
+ else:
+ self.issuer = TestIssuerInternal(pspec)
# use DMI RESET command instead, this does actually work though
# issuer = ResetInserter({'coresync': hard_reset,
# 'sync': hard_reset})(issuer)
class TestRunner(TestRunnerBase):
def __init__(self, tst_data, microwatt_mmu=False, rom=None,
- svp64=True, run_hdl=True, run_sim=True,
+ svp64=True, inorder=False, run_hdl=True, run_sim=True,
allow_overlap=False):
if run_hdl:
run_hdl = HDLRunner
super().__init__(tst_data, microwatt_mmu=microwatt_mmu,
- rom=rom,
+ rom=rom, inorder=inorder,
svp64=svp64, run_hdl=run_hdl, run_sim=run_sim,
allow_overlap=allow_overlap)