def test_execute_trap(self): machine = Machine() machine.loadProgram('Tomasulo/intUnit1.hex') instruction = Instruction(0x44800003) machine.issue(instruction) machine.execute() machine.execute()
def test_nextInstructionAndIssue(self): machine = Machine() machine.loadProgram('Tomasulo/memUnit1.hex') count = 0 while True: instruc = machine.nextInstruction() machine.issue(instruc) count += 1 machine.PC += 4 if instruc.isHalt(): break self.assertEquals(count, 26) rstations = machine.dumpRStations()
def test_issue(self): machine = Machine() instr = Instruction(0x20010003) self.assertTrue(machine.issue(instr)) self.assertTrue(machine.hasInstruction()) rstations = machine.unitContainers['IntUnit'].dumpRStations()