gem5 设定checkpiont以及从checkpoint开始运行

时间:2023-03-10 02:41:58
gem5 设定checkpiont以及从checkpoint开始运行

同spec2006中间bzip2一个例子,如何设置checkpoint 。以及从checkpoint继续以启动运行。这样做的目的是为了,采纳automic运行N指令,然后detailed运行M指令。

1.设置checkpoint:在第5000000条instruction处设置checkpoint

./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg --at-instruction --take-checkpoints=5000000 --max-checkpoints=1 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB;

2.从上次checkpoint处開始:“--at-instruction -r 5000000”表示从第5000000这个checkpoint開始,“-I 5000000”表示再模拟5000000条指令

./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg --at-instruction -r 5000000 -I 5000000 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB --cpu-type=detailed;

3.不设置checkpoint,直接执行10000000条指令

./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg -I 10000000 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB --cpu-type=detailed;

4.採用fast-forward执行N条指令,再使用detailed执行M条指令

#401.bzip2
./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/ref/input/chicken.jpg --fast-forward 40000000000 -I 100000000 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB --cpu-type=detailed;

版权声明:本文博客原创文章,博客,未经同意,不得转载。