gem5集成nvmain

一、gem5的安装

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

二、gem5依赖包的安装

  • sudo apt-get install python scons g++   (查看版本信息:xxx --version)

  • 将swig,m4,protobuf软件包解压到gem5文件夹下(因为我这边有就不用下载了(/≧▽≦)/)

a)swig 

cd swig-3.0.12
./configure --without-pcre
make
sudo make install

ps:查看版本信息以验证安装情况

b)m4

cd m4-1.4.1
sudo make install

ps:查看版本信息以验证安装情况

c)protobuf

cd protobuf-2.5.0
./configure
make
sudo make install

protobuf的默认安装路径是/usr/local/lib,而/usr/local/lib不在Ubuntu体系默认的LD_LIBRARY_PATH中,所以在查看版本信息时会查询不到该lib编辑配置文件。解决办法如下:重新配置路径。

vim ~/.profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

保存并退出:wq

source ~/.profile

ps:查看版本信息以验证安装情况
  • zlib
sudo apt-get install zlib1g-dev

查看版本信息使用:whereis zlib

 

  • sudo apt-get install libprotobuf-dev libgoogle-perftools-dev

三、集成

  • 首先,需要安装一款控制管理软件mercurial
sudo apt-get install mercurial
  • 然后,配置相应的.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

ps:对username,style及from对应内容进行修改(我不会告诉你不改也是可以滴♪(^∇^*),不过这个文件必须( ̄TT ̄)有哦)

  • 接着,需下载nvmain并将其解压至gem5文件夹下,并在gem5文件夹下进行nvmain补丁安装,具体步骤如下:

a)hg qinit

b)hg qimport -f /path/to/nvmain/patches/gem5/nvmain2-gem5-XXXX+

(例如我的补丁包:root@lxb-virtual-machine:/home/gem5/nvmain/patches/gem5/nvmain2-gem5-11688+)

c)hg qpush

d)编译:scons EXTRAS=nvmain build/ALPHA/gem5.opt

e)SE测试:

./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



总结:

这算是我的第一篇博客,格式、内容搭配尚不协调,内容若有不正确、不完整之处,还请见谅\(^o^)/~。

写这篇文章是因为,网上虽然有很多博文,但总有些细节需要把控,希望大家可以少走弯路吧。总相信一句话:独学而无友,孤陋则寡闻。如若不嫌弃,可以一起学习交流喵(*^▽^*)

ps:如果引用我的博客也是很好滴,劳烦加引用哦,Thanks♪(・ω・)ノ

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值