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()
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)
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