gem5学习方法汇总,How to start gem5?

参考:https://www.mail-archive.com/gem5-users@gem5.org/msg06627.html

经过一段时间的摸索和学习,现将gem5的学习思路和方法分享给大家,希望对大家有用!也欢迎一起学习和讨论!

一、准备开始gem5

Here are several things I did to get started.
>

  1. Start with Introduction http://gem5.org/Introduction. Compile gem5 for
    the architecture you are interested, try it with pre-compiled helloworld
    binary.(首先看wiki官网的Documentation,务必动手完成里面的每一个例子)

  2. When you are able to finish the “helloword” simulation, it’s a good
    idea to spend time in documents http://gem5.org/Documentation and
    tutorials http://gem5.org/Tutorials. “Getting start” section and “Running
    gem5” section are must reads. However, it may be quite hard to understand
    everything, but you just need to make sure you know what these articles and
    tutorial slides are talking about at high level. I actually quite like the
    figure on memory system:
    http://www.gem5.org/docs/html/gem5MemorySystem.html

(其次,看完Documentation后再看Tutorials,务必仔细看完,并且做完里面的每个测试实验)
>

While you read the documents, you can try to run some experiments
yourself. For example, different scripts in configs/example, different
modes (FS/SE), different workloads, different simulation models (simple
atomic, simpletiming, InOrder, O3) etc..

  1. After finish first-round reading and blackbox testing, you can dig into
    code. I started from http://gem5.org/SimObjectshttp://gem5.org/SimObjects.
    I myself is not familiar with python too, but I don’t think it’s hard to
    read it as long as you have experience in other languages. If there is some
    keywords, syntax or grammar you don’t understand, go to google or search on
    http://www.python.org/. For C++ part, I think if you know C and OO
    concept, it should not be a big problem either – certain things I don’t
    like about C++ such as templates are used in several places, and may cost
    you sometime to understand.

(专注看相关源代码)
>

While reading source code, I usually keep instrumenting it with printf and
run it with helloword binary so I can keep tracking the control flow. Of
course, don’t simulate a complex system, simpleatomic is good enough. The
only problem I have is compiling gem5 takes too much time. It took me over
20 minutes to build everything on my Dell Precision workstation. So when
you insert printf, try to avoid places like header files. Also try to use
64-bit system as more memory can be used – it seems gem5 needs a lot of
memory to compile.

  1. After you have basic understanding in how a python config file is used
    to instantiate C++ object and how a simulation is started, you can spent
    time in the part you are interested – whether it’s cache or memory, or
    pipelined cpu. Gem5 has many nice designs that you may not find from other
    simulators, I myself is also learning. Also, mailing list is always
    helpful, and you can post your questions if you get stuck.

(当完成上述内容后,可以专注于自己感兴趣的部分)

备注:(可看看这哥们的博客,个人觉得不错)http://blog.csdn.net/wyj7260/article/category/1301132
二、相关测试实验

1、多核缓存及协议配置

参考(43页):http://pages.cs.wisc.edu/~markhill/cs757/Spring2012/includes/isca_pres_2011.pdf
这里写图片描述

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
gem5学习基础完整版,介绍了gem5环境的安装,以及一些基本概念。 gem5仿真器是用于计算机系统体系结构研究的模块化平台,涵盖系统级体系结构以及处理器微体系结构。1、多个可互换的CPU型号。 gem5提供了四种基于解释的CPU模型:简单的单CPI CPU; 有序CPU的详细模型和无序CPU的详细模型。 这些CPU模型使用通用的高级ISA描述。 此外,gem5具有基于KVM的CPU,该CPU使用虚拟化来加速仿真。 2、完全集成的GPU模型,可以执行真实计算机ISA,并支持与主机CPU共享的虚拟内存。 3、NoMali GPU模型。 gem5带有集成的NoMali GPU模型,该模型与Linux和Android GPU驱动程序堆栈兼容,因此无需进行软件渲染。 NoMali GPU不产生任何输出,但可以确保以CPU为中心的实验产生代表性的结果。 4、事件驱动的内存系统。 gem5具有详细的,事件驱动的内存系统,包括高速缓存,交叉开关,探听过滤器以及快速而准确的DRAM控制器模型,用于捕获当前和新兴内存的影响,例如内存。 LPDDR3 / 4/5,DDR3 / 4,GDDR5,HBM1 / 2/3,HMC,WideIO1 / 2。 可以灵活地布置组件,例如,以具有异构存储器的复杂的多级非均匀高速缓存层次结构来建模。 5、基于跟踪的CPU模型,可播放弹性跟踪,这些跟踪是由附着到乱序CPU模型的探针生成的依赖项和定时注释的跟踪。 跟踪CPU模型的重点是以快速,合理的方式而不是使用详细的CPU模型来实现内存系统(高速缓存层次结构,互连和主内存)的性能探索。 6、异构和异构多核。 可以将CPU模型和缓存组合到任意拓扑中,从而创建同构异构的多核系统。 MOESI侦听缓存一致性协议可保持缓存一致性。 7、多种ISA支持。 gem5将ISA语义与其CPU模型解耦,从而实现对多个ISA的有效支持。 目前gem5支持Alpha,ARM,SPARC,MIPS,POWER,RISC-V和x86 ISA。 有关更多信息,请参见支持的体系结构。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值