public ExecutionHistoryCollection(int in_element_count) { m_read_history = new ExecutionHistoryEntry[in_element_count]; m_write_history = new ExecutionHistoryEntry[in_element_count]; for (int i = 0; i < m_write_history.Length; i++) { m_read_history[i] = new ExecutionHistoryEntry(); m_write_history[i] = new ExecutionHistoryEntry(); } }
/// <summary> /// Adds last instruction to the execution history /// </summary> /// <param name="in_instruction_start_pc">PC where the instruction begins</param> /// <param name="in_instruction_t_cycle">T cycle used for execution</param> private void AddInstructionToExecutionHistory(ushort in_instruction_start_pc, uint in_instruction_t_cycle) { ExecutionHistoryEntry history_entry = ExecutionHistory.GetNextEmptySlot(); history_entry.PC = in_instruction_start_pc; history_entry.TCycle = in_instruction_t_cycle; for (int i = 0; i < ExecutionHistoryEntry.HistoryEntryByteBufferLength; i++) { history_entry.Bytes[i] = TVC.Memory.Read((ushort)(in_instruction_start_pc + i)); } }
public void CopyTo(ExecutionHistoryEntry in_entry) { in_entry.PC = PC; in_entry.TCycle = TCycle; Bytes.CopyTo(in_entry.Bytes, 0); }