From 03229f25759898ea2f82ef3e4fe761c452a49701 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Wed, 11 Jan 2012 13:50:18 -0600 Subject: Config: Add support for restoring using a timing CPU Currently there is an assumption that restoration from a checkpoint will happen by first restoring to an atomic CPU and then switching to a timing CPU. This patch adds support for directly restoring to a timing CPU. It adds a new option '--restore-with-cpu' which is used to specify the type of CPU to which the checkpoint should be restored to. It defaults to 'atomic' which was the case before. --- configs/common/Simulation.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'configs/common/Simulation.py') diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index 1897fa8cb..434fe8369 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -60,7 +60,15 @@ def setCPUClass(options): test_mem_mode = 'atomic' if not atomic: - if options.checkpoint_restore != None or options.fast_forward: + if options.checkpoint_restore != None: + if options.restore_with_cpu != options.cpu_type: + CPUClass = TmpClass + class TmpClass(AtomicSimpleCPU): pass + else: + if options.restore_with_cpu != "atomic": + test_mem_mode = 'timing' + + elif options.fast_forward: CPUClass = TmpClass class TmpClass(AtomicSimpleCPU): pass else: -- cgit v1.2.3