Hi Andreas, Thanks for your prompt reply.
I have tried doing it by checkpoint restore method you suggested. But the problem is that it always re-starts the execution from the boot up point. This is not what we would like it to be. It should restore from the point of break. Can you please suggest some way for that. Regards, Shivam On Wed, Oct 16, 2013 at 2:43 PM, Andreas Hansson <[email protected]>wrote: > 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]> > Reply-To: gem5 users mailing list <[email protected]> > Date: Wednesday, 16 October 2013 10:07 > To: gem5 users mailing list <[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 >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
