在gem5中运行模拟时,我可以使用fs.py --cpu-type
选择一个CPU。
如果使用无效的CPU类型(如fs.py --cpu-type
),则此选项还可以显示所有CPU类型的列表。
这些CPU类型之间有什么不同,我应该选择哪一种作为我的实验?
问题的灵感来源:https://www.mail-archive.com/gem5-users@gem5.org/msg16976.html
发布于 2019-10-25 07:41:53
有关CPU类型的概述可在:https://cirosantilli.com/linux-kernel-module-cheat/#gem5-cpu-types中找到。
总结如下:
BaseSimpleCPU
):例如,AtomicSimpleCPU
(默认CPU)。他们没有CPU管道,因此完全不现实。然而,他们也跑得更快。因此,它们主要用于快速引导Linux,然后是检查点,然后切换到更详细的CPU。在简单的CPU中,我们可以很明显地区分:
- `AtomicSimpleCPU`: memory requests finish immediately
- `TimingSimpleCPU:` memory requests actually take time to go through to the memory system and return. Since there is no CPU pipeline however, the simulated CPU stalls on every memory request waiting for a response.
如果主机和客户ISA是相同的,则使用KVM CPUs来加快引导速度,尽管从2019年起,KVM就不那么稳定了,因为实现和调试都比较困难。
MinorCPU
派生,次要表示顺序:。
- for ARM: `HPI` is made by ARM and models a "(2017) modern in-order Armv8-A implementation". This is your best in-order ARM bet.
DerivO3CPU
派生而来,O3表示无序:。
- for ARM: there are no models specifically published by ARM as of 2019. The only specific O3 model available is `ex5_big` for an A15, but you would have to verify its authors claims on how well it models the real core A15 core.
如果这些都不符合你的目的,你可以尝试用参数化的MinorCPU
/ DerivO3CPU
(如HPI
和ex5_big
)来创建你自己的有序/无序模型,尽管这可能很难正确,因为没有足够的非免费CPU的公共信息可以在不进行实验或逆向工程的情况下完成。
您需要考虑的另一件事是内存系统模型。基本上有两种选择:经典的还是Ruby的,在Ruby中有几种选择,参见:https://cirosantilli.com/linux-kernel-module-cheat/#gem5-ruby-build
https://stackoverflow.com/questions/58554232
复制相似问题