We need three repositories:
- This repo
- GEM5 with GCPT support
- NEMU to difftest agaist GEM5
git clone [email protected]:RISCVERS/NEMU.git -b cpp-gem5
# make NEMU
cd NEMU
make ISA=riscv64 XIANGSHAN=1 SHARE=1 -j x
# make GCPT restorer
cd resource/gcpt_restore
make
git clone [email protected]:RISCVERS/GEM5-GCPT.git -b omegaflow
Specify the path of NEMU difftest.so:
change 'REF_SO': '\\\"/home51/zyy/projects/NEMU/build/riscv64-nemu-interpreter-so\\\"'
to 'REF_SO': '\\\"/path/to/NEMU/build/riscv64-nemu-interpreter-so\\\"'
Compile GEM5 (scons3 is required):
scons build/RISCV/gem5.opt -j x
If any header file or library is not found, google it and install.
-
Open
common/local_config.py
. -
Specify the location of
simpoints17.json
andsimpoints06.json
. They determine which simulation points will be simulated. You can copy them for machine-151. -
Open
gem5tasks/restore_gcpt.py
-
set
CurConf = tc.FullWindowO3Config
. tc.FullWindowO3Config is a typical Out-of-Order core with full window scheduler -
set
ver = '17' or '06'
, which is SPECCPU version -
set
num_threads = x
to control the number of GEM5 threads -
set
gem5_base = where you cloned gem5
-
set
top_output_dir = where you want to put experimental results
-
set
data_dir = where generic checkpoints generated by NEMU resides
. You can copy it for machine-151. -
set
--gcpt-restorer
to the location of GCPT restorer (which is inside NEMU/resource).
cd root of BatchTemplate
export PYTHONPATH=`pwd`:$PYTHONPATH
python3 ./gem5tasks/restore_gcpt.py
You can also choose only one simulation points like:
python3 ./gem5tasks/restore_gcpt.py -T imagick/1793100000000