switcheroo.py (9980:cc02ad629b36) | switcheroo.py (10912:b99a6662d7c2) |
---|---|
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 --- 108 unchanged lines hidden (view full) --- 117 exit_cause = exit_event.getCause() 118 119 if exit_cause == "simulate() limit reached": 120 next_cpu = switcher.next() 121 122 if verbose: 123 print "Switching CPUs..." 124 print "Next CPU: %s" % type(next_cpu) | 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 --- 108 unchanged lines hidden (view full) --- 117 exit_cause = exit_event.getCause() 118 119 if exit_cause == "simulate() limit reached": 120 next_cpu = switcher.next() 121 122 if verbose: 123 print "Switching CPUs..." 124 print "Next CPU: %s" % type(next_cpu) |
125 m5.drain(system) | 125 m5.drain() |
126 if current_cpu != next_cpu: 127 m5.switchCpus(system, [ (current_cpu, next_cpu) ], | 126 if current_cpu != next_cpu: 127 m5.switchCpus(system, [ (current_cpu, next_cpu) ], |
128 do_drain=False, verbose=verbose) | 128 verbose=verbose) |
129 else: 130 print "Source CPU and destination CPU are the same, skipping..." | 129 else: 130 print "Source CPU and destination CPU are the same, skipping..." |
131 m5.resume(system) | |
132 current_cpu = next_cpu 133 elif exit_cause == "target called exit()" or \ 134 exit_cause == "m5_exit instruction encountered": 135 136 sys.exit(0) 137 else: 138 print "Test failed: Unknown exit cause: %s" % exit_cause 139 sys.exit(1) | 131 current_cpu = next_cpu 132 elif exit_cause == "target called exit()" or \ 133 exit_cause == "m5_exit instruction encountered": 134 135 sys.exit(0) 136 else: 137 print "Test failed: Unknown exit cause: %s" % exit_cause 138 sys.exit(1) |