Hi Shivam,
The parameter is only passed from the Python to the C++ world on object
construction. Hence, your change never makes it into the actual C++ objects.
If you checkpoint and restore it should work, as the objects actually get
re-created then.
Typically, the DFS would take place inside the simulated system, and not in the
orchestrating Python code, thus our choice of API.
I hope that makes it more clear.
Andreas
From: Shivam Agarwal
<[email protected]<mailto:[email protected]>>
Reply-To: gem5 users mailing list
<[email protected]<mailto:[email protected]>>
Date: Wednesday, 16 October 2013 10:07
To: gem5 users mailing list <[email protected]<mailto:[email protected]>>
Subject: [gem5-users] Problem in dynamically changing the cpu clock values
Hi
I am trying to change the clock frequencies of the different cores dynamically.
I begin with boot up process in atomic mode and then at checkpoint restore move
to detailed mode. To implement dynamic frequency scaling, I added function in
/configs/common/Simulation.py that calls a pre-defined switching function in
src/python/simulate.py as shown below:
def switchcpufreq(root, system, f1, f2, num, do_drain=True):
from m5 import options
if do_drain:
drain(system)
system.cpu[0].clock= f1
system.cpu[1].clock= f2
if do_drain:
resume(system)
In simulation.py the calling function is :
if options.switch_freq:
m5.stats.dump()
m5.stats.reset()
#warmup instruction count may have already been set
if options.warmup_insts:
exit_event = m5.simulate()
else:
exit_event = m5.simulate(options.switch_freq)
print "Switching CPUfreq @ tick %s" % (m5.curTick())
m5.stats.dump()
m5.stats.reset()
m5.switchcpufreq(root, testsys, f1, f2, factor3, factor4, np)
So, the problem here is that it updates the clock frequencies in the
simulation.py file but does not reflect it in the simulation output statistics
(sim_seconds). I feel that the clock is not getting updated in the C++ Object
instantiation.
Kindly help.
Regards
Shivam Agarwal
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered
in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ,
Registered in England & Wales, Company No: 2548782_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users