Step 1 - 参数与核心数据模型

This commit is contained in:
2026-04-14 00:40:16 +08:00
parent fa7b04a880
commit 7eab504f4a
21 changed files with 595 additions and 19 deletions
@@ -0,0 +1,28 @@
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;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5ab511454f082cd4987e3388c3eee16a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: