1# Copyright (c) 2012 ARM Limited 2# All rights reserved 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 228 unchanged lines hidden (view full) --- 237 print "starting switch loop" 238 while True: 239 exit_event = m5.simulate(switch_freq) 240 exit_cause = exit_event.getCause() 241 242 if exit_cause != "simulate() limit reached": 243 return exit_event 244 |
245 m5.switchCpus(testsys, repeat_switch_cpu_list) |
246 247 tmp_cpu_list = [] 248 for old_cpu, new_cpu in repeat_switch_cpu_list: 249 tmp_cpu_list.append((new_cpu, old_cpu)) 250 repeat_switch_cpu_list = tmp_cpu_list 251 252 if (maxtick - m5.curTick()) <= switch_freq: 253 exit_event = m5.simulate(maxtick - m5.curTick()) --- 174 unchanged lines hidden (view full) --- 428 print "Switch at instruction count:%s" % \ 429 str(testsys.cpu[0].max_insts_any_thread) 430 exit_event = m5.simulate() 431 else: 432 print "Switch at curTick count:%s" % str(10000) 433 exit_event = m5.simulate(10000) 434 print "Switched CPUS @ tick %s" % (m5.curTick()) 435 |
436 m5.switchCpus(testsys, switch_cpu_list) |
437 |
438 if options.standard_switch: 439 print "Switch at instruction count:%d" % \ 440 (testsys.switch_cpus[0].max_insts_any_thread) 441 442 #warmup instruction count may have already been set 443 if options.warmup_insts: 444 exit_event = m5.simulate() 445 else: 446 exit_event = m5.simulate(options.standard_switch) 447 print "Switching CPUS @ tick %s" % (m5.curTick()) 448 print "Simulation ends instruction count:%d" % \ 449 (testsys.switch_cpus_1[0].max_insts_any_thread) |
450 m5.switchCpus(testsys, switch_cpu_list1) |
451 452 # If we're taking and restoring checkpoints, use checkpoint_dir 453 # option only for finding the checkpoints to restore from. This 454 # lets us test checkpointing by restoring from one set of 455 # checkpoints, generating a second set, and then comparing them. 456 if options.take_checkpoints and options.checkpoint_restore: 457 if m5.options.outdir: 458 cptdir = m5.options.outdir --- 28 unchanged lines hidden --- |