gem5+NVMain混合编译qpush无报错(+parsec负

2017-10-20  本文已影响0人  Xinxing_Li

网络上的gem5+nvmain编译都有大大小小的错误,在此总结一下一个2017/10/20可行的混合编译流程,参考了左师兄博客(博客中有parsec相关部分) 以及 CSDN一名作者的gem5专栏


初始准备工作

配置hgrc文件

[ui]
# Set the username you will commit code with
username=Your Name <your@email.address>
ssh = ssh -C
# Always use git diffs since they contain permission changes and rename info
[defaults]
qrefresh = --git
email = --git
diff = --git
[extensions]
# These are various extensions we find useful
# Mercurial Queues -- allows managing of changes as a series of patches
hgext.mq =
# PatchBomb -- send a series of changesets as e-mailed patches
hgext.patchbomb =
# External Diff tool (e.g. kdiff3, meld, vimdiff, etc)
hgext.extdiff =
# Fetch allows for a pull/update operation to be done with one command and automatically commits a merge changeset
hgext.fetch =
# Path to the style file for the M5 repository
# This file enforces our coding style requirements
style = /path/to/your/m5/util/style.py
[email]
method = smtp
from = Your Name <your@email.address>
[smtp]
host = your.smtp.server.here

安装GEM5

name@ubuntu:~$ hg clone http://repo.gem5.org/gem5
检查文件列表的时候可能会卡顿一会,耐心等就行了

下载nvmain

点击在bitbucket下载(无需注册帐号)
为什么要下载这个版本,是因为这个版本里的nvmain/patches/gem5/nvmain2-gem5-11688+这个补丁包比较重要,它要求对应的gem5版本也要是11688或者以上的版本.下载完nvmain以后,把它放在gem5的目录里,把长长的文件夹名字改为nvmain(非必须,只是看着方便)

给gem5打补丁并编译

name@ubuntu:~$ cd gem5
name@ubuntu:~/gem5$ hg init
name@ubuntu:~/gem5$ hg qinit
name@ubuntu:~/gem5$ hg update 11688 
#update后在这里会看到有很多文件改变了,这是好的信息,说明gem5更新了
name@ubuntu:~/gem5$ hg qimport -f ./nvmain/patches/gem5/nvmain2-gem5-11688+
#此处nvmain/patch下的补丁版本号和我们的gem5版本号对上了
name@ubuntu:~/gem5$ hg qpush
#过程中会出现style.py路径错误之类的提示信息,目前看来对后续影响不大,先不管,可能是个样式表信息吧

编译成功后测试

name@ubuntu:~/gem5$ ./build/ALPHA/gem5.opt configs/example/se.py -c tests/test-progs/hello/bin/alpha/linux/hello --cpu-type=detailed --caches --l2cache --mem-type=NVMainMemory --nvmain-config=./nvmain/Config/PCM_ISSCC_2012_4GB.config

parsec

运行parsec负载部分可直接参考左鹏飞博客,只需注意最后运行时的指令加入NVMain作为主存即可,最后一步指令如下:

./build/ALPHA/gem5.opt ./configs/example/fs.py -n <number> --script=./path/to/runScript.rcS  --mem-type=NVMainMemory --nvmain-config=./nvmain/Config/PCM_ISSCC_2012_4GB.config --caches --l2cache -F 5000000000

其中-n <number>是线程数,也可以不加这个参数。--script部分要换成自己生成的.rcS脚本。

上一篇 下一篇

猜你喜欢

热点阅读