23 lines
740 B
C#
23 lines
740 B
C#
using VMdemo.Simulation;
|
|
|
|
namespace VMdemo.UI
|
|
{
|
|
public static class TranslationStepDisplay
|
|
{
|
|
public static string ToChinese(TranslationStep step)
|
|
{
|
|
return step switch
|
|
{
|
|
TranslationStep.GenerateVA => "生成虚拟地址",
|
|
TranslationStep.SplitVA => "拆分虚拟地址",
|
|
TranslationStep.LookupTLB => "查询 TLB",
|
|
TranslationStep.LookupPageTable => "查询页表",
|
|
TranslationStep.HandlePageFault => "处理缺页",
|
|
TranslationStep.ComposePA => "合成物理地址",
|
|
TranslationStep.Finalize => "完成收尾",
|
|
_ => step.ToString()
|
|
};
|
|
}
|
|
}
|
|
}
|