用nvmain配置gem5来模拟非易失内存

NVMain是一个体系结构级的非易失内存模拟器,可以准确地模拟内存系统的时序和能耗。NVMain需要放在GEM5全系统模拟器中运行。

1 安装Mercurial

集成NVMain到GEM5中需要用到一个源代码控制管理工具:Mercurial,安装方法:

sudo apt-get install mercurial
2 安装GEM5

使用hg clone命令下载GEM5(推荐使用最新版本的GEM5):

hg clone http://repo.gem5.org/gem5

配置GEM5的运行环境,可参照该教程

3 配置hgrc文件

3.1 打开hgrc文件:

vim ~/.hgrc

3.2 把以下内容加入到hgrc文件中,并将相关配置(如:usernamestylefrom)修改成自己的信息,主要是为因为之后的命令要用到Mercurial的扩展

[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
4 下载NVMain

4.1 注册bitbucket账号;

4.2 按照NVMain网站上的说明获取NVMain的使用权;

4.3 进入GEM5根目录,使用hg clone命令下载NVMain;

5 安装NVMain补丁

5.1 进入GEM5根目录;

5.2 Initialize queues in gem5:

hg qinit

5.3 Import the NVMain patch(文件名可能会改变,可以去nvmain目录下去看具体的名字):

hg qimport -f ./nvmain/patches/gem5/nvmain2-gem5-11688+

5.4 Apply the patch:

hg qpush
6 编译GEM5 with NVMain
scons EXTRAS=nvmain ./build/X86/gem5.opt
评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值