Simulation.py (7534:c76a14014c27) | Simulation.py (7766:1252ec1c8714) |
---|---|
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; --- 232 unchanged lines hidden (view full) --- 241 exit_event = m5.simulate() 242 elif cpu_class and options.fast_forward: 243 print "Switch at instruction count:%s" % \ 244 str(testsys.cpu[0].max_insts_any_thread) 245 exit_event = m5.simulate() 246 else: 247 print "Switch at curTick count:%s" % str(10000) 248 exit_event = m5.simulate(10000) | 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; --- 232 unchanged lines hidden (view full) --- 241 exit_event = m5.simulate() 242 elif cpu_class and options.fast_forward: 243 print "Switch at instruction count:%s" % \ 244 str(testsys.cpu[0].max_insts_any_thread) 245 exit_event = m5.simulate() 246 else: 247 print "Switch at curTick count:%s" % str(10000) 248 exit_event = m5.simulate(10000) |
249 print "Switched CPUS @ cycle = %s" % (m5.curTick()) | 249 print "Switched CPUS @ tick %s" % (m5.curTick()) |
250 251 # when you change to Timing (or Atomic), you halt the system 252 # given as argument. When you are finished with the system 253 # changes (including switchCpus), you must resume the system 254 # manually. You DON'T need to resume after just switching 255 # CPUs if you haven't changed anything on the system level. 256 257 m5.changeToTiming(testsys) --- 4 unchanged lines hidden (view full) --- 262 print "Switch at instruction count:%d" % \ 263 (testsys.switch_cpus[0].max_insts_any_thread) 264 265 #warmup instruction count may have already been set 266 if options.warmup_insts: 267 exit_event = m5.simulate() 268 else: 269 exit_event = m5.simulate(options.warmup) | 250 251 # when you change to Timing (or Atomic), you halt the system 252 # given as argument. When you are finished with the system 253 # changes (including switchCpus), you must resume the system 254 # manually. You DON'T need to resume after just switching 255 # CPUs if you haven't changed anything on the system level. 256 257 m5.changeToTiming(testsys) --- 4 unchanged lines hidden (view full) --- 262 print "Switch at instruction count:%d" % \ 263 (testsys.switch_cpus[0].max_insts_any_thread) 264 265 #warmup instruction count may have already been set 266 if options.warmup_insts: 267 exit_event = m5.simulate() 268 else: 269 exit_event = m5.simulate(options.warmup) |
270 print "Switching CPUS @ cycle = %s" % (m5.curTick()) | 270 print "Switching CPUS @ tick %s" % (m5.curTick()) |
271 print "Simulation ends instruction count:%d" % \ 272 (testsys.switch_cpus_1[0].max_insts_any_thread) 273 m5.drain(testsys) 274 m5.switchCpus(switch_cpu_list1) 275 m5.resume(testsys) 276 277 num_checkpoints = 0 278 exit_cause = '' --- 83 unchanged lines hidden (view full) --- 362 exit_cause = "maximum %d checkpoints dropped" % max_checkpoints 363 break 364 365 exit_event = m5.simulate(maxtick - m5.curTick()) 366 exit_cause = exit_event.getCause() 367 368 if exit_cause == '': 369 exit_cause = exit_event.getCause() | 271 print "Simulation ends instruction count:%d" % \ 272 (testsys.switch_cpus_1[0].max_insts_any_thread) 273 m5.drain(testsys) 274 m5.switchCpus(switch_cpu_list1) 275 m5.resume(testsys) 276 277 num_checkpoints = 0 278 exit_cause = '' --- 83 unchanged lines hidden (view full) --- 362 exit_cause = "maximum %d checkpoints dropped" % max_checkpoints 363 break 364 365 exit_event = m5.simulate(maxtick - m5.curTick()) 366 exit_cause = exit_event.getCause() 367 368 if exit_cause == '': 369 exit_cause = exit_event.getCause() |
370 print 'Exiting @ cycle %i because %s' % (m5.curTick(), exit_cause) | 370 print 'Exiting @ tick %i because %s' % (m5.curTick(), exit_cause) |
371 372 if options.checkpoint_at_end: 373 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 374 | 371 372 if options.checkpoint_at_end: 373 m5.checkpoint(joinpath(cptdir, "cpt.%d")) 374 |