enable MMU in SimRunner if requested. now HDL and ISACaller run MMU
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Dec 2021 17:47:03 +0000 (17:47 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Dec 2021 17:47:03 +0000 (17:47 +0000)
src/openpower/test/runner.py

index 089ac4f7271b3a5cdad167b4e238c6f85be5429d..5d68ec74db2a23b119ae8ec328faea96f2142c13 100644 (file)
@@ -42,6 +42,7 @@ class SimRunner(StateRunner):
         super().__init__("sim", SimRunner)
         self.dut = dut
 
+        self.mmu = pspec.mmu == True
         regreduce_en = pspec.regreduce_en == True
         self.simdec2 = simdec2 = PowerDecode2(None, regreduce_en=regreduce_en)
         m.submodules.simdec2 = simdec2  # pain in the neck
@@ -64,7 +65,8 @@ class SimRunner(StateRunner):
                   initial_insns=gen, respect_pc=True,
                   disassembly=insncode,
                   bigendian=bigendian,
-                  initial_svstate=test.svstate)
+                  initial_svstate=test.svstate,
+                  mmu=self.mmu)
 
         # run the loop of the instructions on the current test
         index = sim.pc.CIA.value//4