test.py

来自「M5,一个功能强大的多处理器系统模拟器.很多针对处理器架构,性能的研究都使用它作」· Python 代码 · 共 20 行

PY
20
字号
m5.AddToPath('../configs/common')from cpu2000 import twolfimport osworkload = twolf(isa, opsys, 'smred')root.system.cpu.workload = workload.makeLiveProcess()cwd = root.system.cpu.workload[0].cwd#Remove two files who's presence or absence affects executionsav_file = os.path.join(cwd, workload.input_set + '.sav')sv2_file = os.path.join(cwd, workload.input_set + '.sv2')try:    os.unlink(sav_file)except:    print "Couldn't unlink ", sav_filetry:    os.unlink(sv2_file)except:    print "Couldn't unlink ", sv2_file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?