An individual repo to contain all the tools that I created for arch research.
We will support or have supported these features:
- Multiple GEM5 instances on single machine restoring from the Generic checkpoint for RISC-V
- Multiple NEMU(private repo) instances on single machine restoring from the Generic checkpoint for RISC-V
- Multiple Verilator simulation of Xiangshan instances on single machine restoring from the Generic checkpoint for RISC-V
- Bug ''generation'', bug info gathering and VCD gathering for Xiangshan
- Stats gathering for GEM5
We might support, but will not support in the near future:
- Distributed version
We use sh
package to call simulators:
pip install sh
We will use GEM5 as an Example. We have a modified version of GEM5 here that supports current MMIO space and Generic Checkpoint. A full GEM5 tutorial can be found here.
First, install dependent packages.
For debian family:
sudo apt install gcc g++ python3 zlib1g-dev m4 libprotobuf-dev git swig python-dev protobuf-compiler libgoogle-perftools-dev libevent-dev make libncurses5-dev build-essential autoconf
For an old centos (newer RPM family might provide most of them):
No package g++ available. --> gcc-g++
No package zlib1g-dev available. --> zlib
No package libprotobuf-dev available. --> manully install:
wget http://cbs.centos.org/kojifiles/packages/protobuf/2.5.0/10.el7.centos/x86_64/protobuf-2.5.0-10.el7.centos.x86_64.rpm
wget http://cbs.centos.org/kojifiles/packages/protobuf/2.5.0/10.el7.centos/x86_64/protobuf-devel-2.5.0-10.el7.centos.x86_64.rpm
wget http://cbs.centos.org/kojifiles/packages/protobuf/2.5.0/10.el7.centos/x86_64/protobuf-compiler-2.5.0-10.el7.centos.x86_64.rpm
sudo yum -y install protobuf-2.5.0-10.el7.centos.x86_64.rpm \
protobuf-compiler-2.5.0-10.el7.centos.x86_64.rpm \
protobuf-devel-2.5.0-10.el7.centos.x86_64.rpm
No package python-dev available. --> python-devel
No package libgoogle-perftools-dev available. --> google-perftools google-perftools-devel
No package libevent-dev available. --> ?
No package libncurses5-dev available. --> ?
Prepare scons 3 manually, the default scons installed are often scons 2 or are frozen to be scons 2 for oldder version of GEM5. So for newer versions of GEM5, we manually download scons 3 from sourceforge. Then expose the script to PATH in bashrc/zshrc/xxrc:
export PATH=/the/path/to/scons-3.1.2/src/script:$PATH
Note that scons
is still the old scons, while scons.py
is the newly installed one.
# Do to forget to source
source ~/.blablarc
cd /where/gem5/is/cloned
scons.py build/RISCV/gem5.opt -j 40
Wait a few minutes.
cd /this/repo
In gem5tasks/restore_gcpt.py
, modify there variables:
exe = The gem5.opt file
data_dir = where generic checkpoint files reside
top_output_dir = where you want to store output stats and logs
task.direct_options += ['/path/toconfigs/example/fs.py']
python3 ./gem5tasks/restore_gcpt.py