Simulation.py (9215:a67412670f37) | Simulation.py (9221:4f54b0f229b5) |
---|---|
1# Copyright (c) 2006-2008 The Regents of The University of Michigan 2# Copyright (c) 2010 Advanced Micro Devices, Inc. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 439 unchanged lines hidden (view full) --- 448 print "Switched CPUS @ tick %s" % (m5.curTick()) 449 450 # when you change to Timing (or Atomic), you halt the system 451 # given as argument. When you are finished with the system 452 # changes (including switchCpus), you must resume the system 453 # manually. You DON'T need to resume after just switching 454 # CPUs if you haven't changed anything on the system level. 455 | 1# Copyright (c) 2006-2008 The Regents of The University of Michigan 2# Copyright (c) 2010 Advanced Micro Devices, Inc. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 439 unchanged lines hidden (view full) --- 448 print "Switched CPUS @ tick %s" % (m5.curTick()) 449 450 # when you change to Timing (or Atomic), you halt the system 451 # given as argument. When you are finished with the system 452 # changes (including switchCpus), you must resume the system 453 # manually. You DON'T need to resume after just switching 454 # CPUs if you haven't changed anything on the system level. 455 |
456 m5.doDrain(testsys) |
|
456 m5.changeToTiming(testsys) 457 m5.switchCpus(switch_cpu_list) 458 m5.resume(testsys) 459 460 if options.standard_switch: 461 print "Switch at instruction count:%d" % \ 462 (testsys.switch_cpus[0].max_insts_any_thread) 463 464 #warmup instruction count may have already been set 465 if options.warmup_insts: 466 exit_event = m5.simulate() 467 else: 468 exit_event = m5.simulate(options.standard_switch) 469 print "Switching CPUS @ tick %s" % (m5.curTick()) 470 print "Simulation ends instruction count:%d" % \ 471 (testsys.switch_cpus_1[0].max_insts_any_thread) | 457 m5.changeToTiming(testsys) 458 m5.switchCpus(switch_cpu_list) 459 m5.resume(testsys) 460 461 if options.standard_switch: 462 print "Switch at instruction count:%d" % \ 463 (testsys.switch_cpus[0].max_insts_any_thread) 464 465 #warmup instruction count may have already been set 466 if options.warmup_insts: 467 exit_event = m5.simulate() 468 else: 469 exit_event = m5.simulate(options.standard_switch) 470 print "Switching CPUS @ tick %s" % (m5.curTick()) 471 print "Simulation ends instruction count:%d" % \ 472 (testsys.switch_cpus_1[0].max_insts_any_thread) |
472 m5.drain(testsys) | 473 m5.doDrain(testsys) |
473 m5.switchCpus(switch_cpu_list1) 474 m5.resume(testsys) 475 476 # If we're taking and restoring checkpoints, use checkpoint_dir 477 # option only for finding the checkpoints to restore from. This 478 # lets us test checkpointing by restoring from one set of 479 # checkpoints, generating a second set, and then comparing them. 480 if options.take_checkpoints and options.checkpoint_restore: --- 27 unchanged lines hidden --- | 474 m5.switchCpus(switch_cpu_list1) 475 m5.resume(testsys) 476 477 # If we're taking and restoring checkpoints, use checkpoint_dir 478 # option only for finding the checkpoints to restore from. This 479 # lets us test checkpointing by restoring from one set of 480 # checkpoints, generating a second set, and then comparing them. 481 if options.take_checkpoints and options.checkpoint_restore: --- 27 unchanged lines hidden --- |