public void AddExecutionRecord(Instruction instruction) { switch (instruction.RelativeClock) { case 0: ExecutionRecords[ClockCycle].Add(new ExecutionRecord(ExecutionType.Fetch, instruction.GetFetch(), instruction.ExecutionOrder, instruction)); break; case 1: ExecutionRecords[ClockCycle].Add(new ExecutionRecord(ExecutionType.Decode, instruction.GetDecode(), instruction.ExecutionOrder, instruction)); break; case 2: ExecutionRecords[ClockCycle].Add(new ExecutionRecord(ExecutionType.Execute, instruction.GetExecute(), instruction.ExecutionOrder, instruction)); break; case 3: ExecutionRecords[ClockCycle].Add(new ExecutionRecord(ExecutionType.Memory, instruction.GetMem(), instruction.ExecutionOrder, instruction)); break; case 4: ExecutionRecords[ClockCycle].Add(new ExecutionRecord(ExecutionType.Writeback, instruction.GetWriteback(), instruction.ExecutionOrder, instruction)); break; } }
public void AddInstruction(Instruction instruction) { _instructions.Add(instruction); IsReady = true; }