ISACaller: add option mmu
authorTobias Platen <tplaten@posteo.de>
Thu, 4 Mar 2021 19:05:44 +0000 (20:05 +0100)
committerTobias Platen <tplaten@posteo.de>
Thu, 4 Mar 2021 19:05:44 +0000 (20:05 +0100)
src/soc/decoder/isa/caller.py

index bfa2eb03cda34f8931d7a2e7687237b86211e001..4ee49443baf5ba64152af61481596bd3b96b1340 100644 (file)
@@ -723,7 +723,8 @@ class ISACaller:
                  initial_insns=None, respect_pc=False,
                  disassembly=None,
                  initial_pc=0,
-                 bigendian=False):
+                 bigendian=False,
+                 mmu=False):
 
         self.bigendian = bigendian
         self.halted = False
@@ -763,6 +764,8 @@ class ISACaller:
         self.svstate = initial_svstate
         self.gpr = GPR(decoder2, self, self.svstate, regfile)
         self.mem = Mem(row_bytes=8, initial_mem=initial_mem)
+        if mmu:
+            self.mem = RADIX(self.mem,self)
         self.imem = Mem(row_bytes=4, initial_mem=initial_insns)
         self.pc = PC()
         self.spr = SPR(decoder2, initial_sprs)