test/runner: introduce use_syscall_emu parameter
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 18 Oct 2023 15:26:14 +0000 (18:26 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Dec 2023 19:26:21 +0000 (19:26 +0000)
src/openpower/test/runner.py

index 00de46914db1a2591212079834ee81cf9fd85bb8..6f15a26ee520192d9308f048122375cf53a1d452 100644 (file)
@@ -43,7 +43,9 @@ class SimRunner(StateRunner):
     running of tests using ISACaller simulation
     """
 
-    def __init__(self, dut, m, pspec, use_mmap_mem=False):
+    def __init__(self, dut, m, pspec,
+            use_mmap_mem=False,
+            use_syscall_emu=False):
         super().__init__("sim", SimRunner)
         self.dut = dut
 
@@ -54,6 +56,7 @@ class SimRunner(StateRunner):
             None, regreduce_en=regreduce_en, fp_en=fp_en)
         m.submodules.simdec2 = simdec2  # pain in the neck
         self.use_mmap_mem = use_mmap_mem
+        self.use_syscall_emu = use_syscall_emu
 
     def prepare_for_test(self, test):
         self.test = test
@@ -77,7 +80,8 @@ class SimRunner(StateRunner):
                   mmu=self.mmu,
                   fpregfile=test.fpregs,
                   initial_fpscr=test.initial_fpscr,
-                  use_mmap_mem=self.use_mmap_mem)
+                  use_mmap_mem=self.use_mmap_mem,
+                  use_syscall_emu=self.use_syscall_emu)
 
         # run the loop of the instructions on the current test
         index = sim.pc.CIA.value//4
@@ -134,7 +138,8 @@ class TestRunnerBase(FHDLTestCase):
     def __init__(self, tst_data, microwatt_mmu=False, rom=None,
                  svp64=True, run_hdl=None, run_sim=True,
                  allow_overlap=False, inorder=False, fp=False,
-                 use_mmap_mem=False):
+                 use_mmap_mem=False,
+                 use_syscall_emu=False):
         super().__init__("run_all")
         self.test_data = tst_data
         self.microwatt_mmu = microwatt_mmu
@@ -146,6 +151,7 @@ class TestRunnerBase(FHDLTestCase):
         self.run_sim = run_sim
         self.fp = fp
         self.use_mmap_mem = use_mmap_mem
+        self.use_syscall_emu = use_syscall_emu
 
     def run_all(self):
         m = Module()
@@ -199,7 +205,9 @@ class TestRunnerBase(FHDLTestCase):
             state_list.append(hdlrun)
 
         if self.run_sim:
-            simrun = SimRunner(self, m, pspec, use_mmap_mem=self.use_mmap_mem)
+            simrun = SimRunner(self, m, pspec,
+                use_mmap_mem=self.use_mmap_mem,
+                use_syscall_emu=self.use_syscall_emu)
             state_list.append(simrun)
 
         # run core clock at same rate as test clock