我正在尝试将 gem5 模拟器模型的输出转换为 XML 格式,以便将其用作 McPAT 模拟器的输入(以获取功率结果)。执行此转换的文件是借助另一个 XML 文件的 Python 文件。
我使用以下命令在 Ubuntu 20.04 中运行 Python 文件:
python2 GEM5ToMcPAT.py Gem5_readings/stats.txt Gem5_readings/config.json inorder_arm.xml -o my_output.xml
并收到以下错误消息,没有 my_output.xml 结果:
Reading GEM5 stats from: Gem5_readings/stats.txt
Warning (stats): system.cpu_cluster.cpus0.dcache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus0.dcache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus0.icache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus0.icache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus1.dcache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus1.dcache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus1.icache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus1.icache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus2.dcache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus2.dcache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus2.icache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus2.icache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus3.dcache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus3.dcache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus3.icache.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.cpus3.icache.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.cpu_cluster.l2.avgBlocked::no_mshrs is nan. Setting it to 0
Warning (stats): system.cpu_cluster.l2.avgBlocked::no_targets is nan. Setting it to 0
Warning (stats): system.mem_ctrls0.dram.writeRowHitRate is nan. Setting it to 0
Warning (stats): system.mem_ctrls1.dram.writeRowHitRate is nan. Setting it to 0
Reading config from: Gem5_readings/config.json
Reading McPAT template from: inorder_arm.xml
***WARNING: system.cpu does not exist in config.***
Please use the right config param in your McPAT template file
***WARNING: system.cpu.decodeInputWidth does not exist in config.***
Please use the right config param in your McPAT template file
Traceback (most recent call last):
File "GEM5ToMcPAT.py", line 181, in <module>
main()
File "GEM5ToMcPAT.py", line 53, in main
dumpMcpatOut(opts.out)
File "GEM5ToMcPAT.py", line 80, in dumpMcpatOut
exprs[i] = str(eval(exprs[i]))
File "<string>", line 1
{u'membus': {u'point_of_coherency': True
^
SyntaxError: unexpected EOF while parsing