gem5 一)配置Gem5執行環境

2021-08-27 08:37:39 字數 535 閱讀 1836

系統環境:ubuntu 18.04

1. 安裝相關的依賴庫

通過命令sudo apt install 安裝下列的依賴庫:

git, build-essential, scons, python-dev, swig, libprotobuf-dev, python-protobuf, protobuf-compiler, libgoogle-perftools-dev, zlib1g-dev, m4

另外還需要安裝mecurial包,但是筆者在安裝時發現無法通過sudo apt install 來安裝,於是通過命令 pip來安裝的。首先安裝pip

sudo install python-pip

然後安裝mecurial包

sudo pip install mecurial

2. 獲取**

hg clone

3. 編譯gem5

scons build/arm/gem5.opt

如何除錯gem5

printf 是很好的工具,同時gem5在自己 裡面就有很多已經做好的輸出資訊,可以通過flag制定來選擇。輸出flags fetch,decode,ethernet,exec,tlb,dma,bus,cache,loader,o3cpuall,要想知道所有的flags,執行的時候加上 debug ...

在gem5上執行Splash benchmarks

有2種方式在gem5上執行splash 2,即fs full system 模式和se syscall emulation 模式 最穩定的方法是使用parmacs macros的乙個pthreads實現來編譯benchmarks,然後鏈結標準linux pthreads library並在m5上以f...

小白的Gem5安裝

查閱了很多部落格教程,我的安裝過程主要分為三步 安裝依賴軟體 編譯執行 為簡化,直接可以參考我瀏覽的部落格 傳送門 需要安裝g python scons 用於編譯 swig,zlib m4 protobuf 等依賴軟體。在安裝時出現了部分包無法識別的問題,我更新了中科大源並且 第二天 重新嘗試,沒有...