This repository has been archived on 2026-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
Virtual-Memory-Demo/Assets/Scripts/Simulation/SimulationState.cs

29 lines
780 B
C#

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