Hello,
I am hitting a problem using the new gem5 std lib.
When restoring from a checkpoint generated from any gem5 lib script, the simulation hangs (the simulation does not call the advance function in the CPU).
To reproduce (tested on top of develop from today):
Generate a checkpoint using gem5-lib
./build/RISCV/gem5.opt configs/example/gem5_library/checkpoints/riscv-hello-save-checkpoint.py
Change the checkpoint name so common/Simulation.py can find the checkpoint: directory needs to be named cpt.[0-9]*
mv riscv-hello-checkpoint/ cpt.000000000001/
Run the checkpoint
/build/RISCV/gem5.opt configs/example/se.py -r 1 -cpu-type RiscvTimingCPU -c <path to riscv hello world bin>
The simulation advance normally, but no CPU event are scheduled in the event queue -> it loops infinitely.
I also tried to restore from a script using the gem5-lib instead of Simulation.py, but it has the same behavior.
Am I doing something wrong?
If not, does someone have a guess from where the bug is coming from.
Thanks
Tom
Hi,
Ideally, when restoring from a checkpoint, the system configuration should
be identical to the one used for taking the checkpoint. However, you can
add (cannot remove) SimObjects in the restore script.
The example checkpoint restore script is
at configs/example/gem5_library/checkpoints/riscv-hello-restore-checkpoint.py.
If you'd like to use the checkpoint folder on your local machine instead of
downloading the checkpoint from gem5 resources, you can modify the
checkpoint_path parameter in the Simulator constructor.
Regards,
Hoa Nguyen
On Wed, Jun 22, 2022, 11:46 Tom Rollet tom.rollet@huawei.com wrote:
Hello,
I am hitting a problem using the new gem5 std lib.
When restoring from a checkpoint generated from any gem5 lib script, the
simulation hangs (the simulation does not call the advance function in the
CPU).
To reproduce (tested on top of develop from today):
1. Generate a checkpoint using gem5-lib
./build/RISCV/gem5.opt
configs/example/gem5_library/checkpoints/riscv-hello-save-checkpoint.py
1. Change the checkpoint name so common/Simulation.py can find the
checkpoint: directory needs to be named cpt.[0-9]*
mv riscv-hello-checkpoint/ cpt.000000000001/
1. Run the checkpoint
/build/RISCV/gem5.opt configs/example/se.py -r 1 –cpu-type
RiscvTimingCPU -c <path to riscv hello world bin>
The simulation advance normally, but no CPU event are
scheduled in the event queue -> it loops infinitely.
I also tried to restore from a script using the gem5-lib
instead of Simulation.py, but it has the same behavior.
Am I doing something wrong?
If not, does someone have a guess from where the bug is coming from.
Thanks
Tom
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org