if __name__ == "__main__":
svp64 = True
- if len(sys.argv) == 2:
- if sys.argv[1] == 'nosvp64':
- svp64 = False
- sys.argv.pop()
+ if sys.argv[1] == 'nosvp64':
+ svp64 = False
+ del sys.argv[1]
+
+ # detect overlap case
+ allow_overlap = False
+ if sys.argv[1] == '--allow-overlap':
+ allow_overlap = True
+ del sys.argv[1]
# allow list of testing to be selected by command-line
testing = sys.argv[1:]
'logical', 'alu',
'branch', 'div', 'mul', 'hazard']
- print ("SVP64 test mode enabled", svp64, testing)
+ print ("SVP64 test mode enabled", svp64, "overlap",
+ allow_overlap, "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,
+ allow_overlap=allow_overlap))
runner = unittest.TextTestRunner()
runner.run(suite)
class TestRunner(TestRunnerBase):
def __init__(self, tst_data, microwatt_mmu=False, rom=None,
- svp64=True, run_hdl=True, run_sim=True):
+ svp64=True, 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,
- svp64=svp64, run_hdl=run_hdl, run_sim=run_sim)
+ svp64=svp64, run_hdl=run_hdl, run_sim=run_sim,
+ allow_overlap=False)