Hi Hongyuan,
switchcpu causes simulation to exit with the cause "switchcpu", it doesn't
actually cause a CPU switch. You could do something like this: add
"/sbin/m5 switchcpu" to your rcS script before you launch your benchmark.
Then you will need to modify the Simulation.py script to recognize that
command and do the proper switching. I have included a patch as a simple
example. This is something I've used to do what you aim to do. However, I
simply add /sbin/m5 exit in my rcS script and the Simulation.py script
assumes it needs to switch after it exits simulate.
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -81,6 +81,10 @@
CPUClass = TmpClass
TmpClass = AtomicSimpleCPU
test_mem_mode = 'atomic'
+ else:
+ CPUClass = TmpClass
+ TmpClass = AtomicSimpleCPU
+ test_mem_mode = 'atomic'
return (TmpClass, test_mem_mode, CPUClass)
@@ -444,8 +448,9 @@
str(testsys.cpu[0].max_insts_any_thread)
exit_event = m5.simulate()
else:
- print "Switch at curTick count:%s" % str(10000)
- exit_event = m5.simulate(10000)
+ print "Switch when kernel boots"
+ #exit_event = m5.simulate(10000)
+ exit_event = m5.simulate()
print "Switched CPUS @ tick %s" % (m5.curTick())
# when you change to Timing (or Atomic), you halt the system
@@ -493,6 +498,8 @@
else:
if options.fast_forward:
m5.stats.reset()
+ m5.stats.dump()
+ m5.stats.reset()
print "**** REAL SIMULATION ****"
# If checkpoints are being taken, then the checkpoint instruction
Thanks,
Tony
On Thu, Feb 7, 2013 at 1:15 PM, Ding, Hongyuan <[email protected]> wrote:
> Hi all,
> I tried to run some benchmarks in FS mode with arm_detailed cpu.
> But it took hours to boot the system, let alone running the benchmarks.
> I want to use atomic cpu when booting system and use arm_detailed
> cpu to run benchmarks in FS mode. How can I use "./sbin/m5 switchcpu" in
> rcS files to switch to detailed cpu, and what arguments should I add for
> running gem5?
> Thanks!
>
> --
> Best regard,
> Hongyuan Ding
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users