fix AttributeError in radixmmu testcase
authorTobias Platen <tplaten@posteo.de>
Tue, 13 Apr 2021 16:43:37 +0000 (18:43 +0200)
committerTobias Platen <tplaten@posteo.de>
Tue, 13 Apr 2021 16:43:37 +0000 (18:43 +0200)
src/soc/decoder/isa/caller.py

index e896e9e22149d72ffd12949f5c3108f74f246c45..ba24f48fa54d0a9130ab30b6ce68594fc9469a8d 100644 (file)
@@ -469,11 +469,11 @@ class ISACaller:
         self.mem = Mem(row_bytes=8, initial_mem=initial_mem)
         self.imem = Mem(row_bytes=4, initial_mem=initial_insns)
         # MMU mode, redirect underlying Mem through RADIX
+        self.msr = SelectableInt(initial_msr, 64)  # underlying reg
         if mmu:
             self.mem = RADIX(self.mem, self)
             self.imem = RADIX(self.imem, self)
         self.pc = PC()
-        self.msr = SelectableInt(initial_msr, 64)  # underlying reg
 
         # TODO, needed here:
         # FPR (same as GPR except for FP nums)