diff --git a/riscemu/instructions/InstructionSet.py b/riscemu/instructions/InstructionSet.py index f5d0f01..6b55e7d 100644 --- a/riscemu/instructions/InstructionSet.py +++ b/riscemu/instructions/InstructionSet.py @@ -29,8 +29,6 @@ class InstructionSet(ABC): """ self.name = self.__class__.__name__ self.cpu = cpu - self.mmu = cpu.mmu - self.regs = cpu.regs def load(self) -> Dict[str, Callable[['LoadedInstruction'], None]]: """ @@ -132,6 +130,14 @@ class InstructionSet(ABC): def pc(self, val): self.cpu.pc = val + @property + def mmu(self): + return self.cpu.mmu + + @property + def regs(self): + return self.cpu.regs + def __repr__(self): return "InstructionSet[{}] with {} instructions".format( self.__class__.__name__,