using System; using VMdemo.Core; namespace VMdemo.Simulation { [Serializable] public class SimulationState { public int CurrentRound { get; set; } public TranslationStep CurrentStep { get; set; } public ulong CurrentVirtualAddress { get; set; } public AddressParts CurrentAddressParts { get; set; } public ulong CurrentPhysicalAddress { get; set; } public ulong CurrentPfn { get; set; } public bool HasCurrentPfn { get; set; } public bool IsPageFault { get; set; } public bool IsTlbHit { get; set; } public bool IsPageTableHit { get; set; } public int CurrentCost { get; set; } public string LastDecisionReason { get; set; } public void Reset() { CurrentRound = 0; CurrentStep = TranslationStep.GenerateVA; CurrentVirtualAddress = 0UL; CurrentAddressParts = AddressParts.Empty; CurrentPhysicalAddress = 0UL; CurrentPfn = 0UL; HasCurrentPfn = false; IsPageFault = false; IsTlbHit = false; IsPageTableHit = false; CurrentCost = 0; LastDecisionReason = string.Empty; } } }