unit test: pass bool mmu
authorTobias Platen <tplaten@posteo.de>
Fri, 5 Mar 2021 16:47:53 +0000 (17:47 +0100)
committerTobias Platen <tplaten@posteo.de>
Fri, 5 Mar 2021 16:47:53 +0000 (17:47 +0100)
src/soc/decoder/isa/test_caller.py
src/soc/decoder/isa/test_caller_radix.py

index 691d9a7..6863fff 100644 (file)
@@ -16,7 +16,7 @@ class Register:
     def __init__(self, num):
         self.num = num
 
-def run_tst(generator, initial_regs, initial_sprs=None, svstate=0):
+def run_tst(generator, initial_regs, initial_sprs=None, svstate=0, mmu=False):
     if initial_sprs is None:
         initial_sprs = {}
     m = Module()
@@ -34,7 +34,8 @@ def run_tst(generator, initial_regs, initial_sprs=None, svstate=0):
                     initial_insns=gen, respect_pc=True,
                     initial_svstate=svstate,
                     disassembly=insncode,
-                    bigendian=0)
+                    bigendian=0,
+                    mmu=mmu)
     comb += pdecode2.dec.raw_opcode_in.eq(instruction)
     sim = Simulator(m)
 
index 9b92cf8..a892e4c 100644 (file)
@@ -26,7 +26,7 @@ class DecoderTestCase(FHDLTestCase):
             self.assertEqual(sim.gpr(3), SelectableInt(0x1234, 64))
 
     def run_tst_program(self, prog, initial_regs=[0] * 32):
-        simulator = run_tst(prog, initial_regs)
+        simulator = run_tst(prog, initial_regs,mmu=True)
         simulator.gpr.dump()
         return simulator