diff --git a/src/simudator/processor/mia/mia.py b/src/simudator/processor/mia/mia.py index 77262a491150cf9ffcae827aead8b5db3b346082..a3b0b46af240cdc799911d71eec920c82fa9575a 100644 --- a/src/simudator/processor/mia/mia.py +++ b/src/simudator/processor/mia/mia.py @@ -280,17 +280,22 @@ class MIA_CPU(Processor): self.micro_memory = uM + # List containing all clock cycles where a new asm instruction started + self.assembly_cycles = [] + self.lambdas = {} def do_tick(self) -> None: - """After each tick Mia checks for a new instruction. + """Mia has special assembly related behaviour. - This is done by checking if the value of the micro PC is equal to zero.""" + This includes fetching the curret asm instruction, and saving the current clock + cycle in a list to enable stepping back over assembly instructions. + """ super().do_tick() if self.get_module("uPC").value == 0: self.new_instruction = True self.current_instruction = self.get_current_instrution() - print(self.current_instruction) + self.assembly_cycles.append(self.get_clock()) else: self.new_instruction = False