Simulation.py (5371:dce5a8655829) Simulation.py (5378:7c058e69f257)
1# Copyright (c) 2006-2008 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 114 unchanged lines hidden (view full) ---

123 # if restoring, make atomic cpu simulate only a few instructions
124 if options.checkpoint_restore != None:
125 testsys.cpu[i].max_insts_any_thread = 1
126 # Fast forward to specified location if we are not restoring
127 elif options.fast_forward:
128 testsys.cpu[i].max_insts_any_thread = int(options.fast_forward)
129 # Fast forward to a simpoint (warning: time consuming)
130 elif options.simpoint:
1# Copyright (c) 2006-2008 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 114 unchanged lines hidden (view full) ---

123 # if restoring, make atomic cpu simulate only a few instructions
124 if options.checkpoint_restore != None:
125 testsys.cpu[i].max_insts_any_thread = 1
126 # Fast forward to specified location if we are not restoring
127 elif options.fast_forward:
128 testsys.cpu[i].max_insts_any_thread = int(options.fast_forward)
129 # Fast forward to a simpoint (warning: time consuming)
130 elif options.simpoint:
131 if testsys.cpu[i].workload[0].simpoint == None:
131 if testsys.cpu[i].workload[0].simpoint == 0:
132 m5.panic('simpoint not found')
133 testsys.cpu[i].max_insts_any_thread = \
134 testsys.cpu[i].workload[0].simpoint
135 # No distance specified, just switch
136 else:
137 testsys.cpu[i].max_insts_any_thread = 1
138
139 # warmup period

--- 17 unchanged lines hidden (view full) ---

157
158 # set the checkpoint in the cpu before m5.instantiate is called
159 if options.take_checkpoints != None and \
160 (options.simpoint or options.at_instruction):
161 offset = int(options.take_checkpoints)
162 # Set an instruction break point
163 if options.simpoint:
164 for i in xrange(np):
132 m5.panic('simpoint not found')
133 testsys.cpu[i].max_insts_any_thread = \
134 testsys.cpu[i].workload[0].simpoint
135 # No distance specified, just switch
136 else:
137 testsys.cpu[i].max_insts_any_thread = 1
138
139 # warmup period

--- 17 unchanged lines hidden (view full) ---

157
158 # set the checkpoint in the cpu before m5.instantiate is called
159 if options.take_checkpoints != None and \
160 (options.simpoint or options.at_instruction):
161 offset = int(options.take_checkpoints)
162 # Set an instruction break point
163 if options.simpoint:
164 for i in xrange(np):
165 if testsys.cpu[i].workload[0].simpoint == None:
165 if testsys.cpu[i].workload[0].simpoint == 0:
166 m5.panic('no simpoint for testsys.cpu[%d].workload[0]' % i)
167 checkpoint_inst = int(testsys.cpu[i].workload[0].simpoint) + offset
168 testsys.cpu[i].max_insts_any_thread = checkpoint_inst
169 # used for output below
170 options.take_checkpoints = checkpoint_inst
171 else:
172 options.take_checkpoints = offset
173 # Set all test cpus with the right number of instructions

--- 18 unchanged lines hidden (view full) ---

192 m5.panic("Unable to find checkpoint directory %s" % \
193 checkpoint_dir)
194
195 print "Restoring checkpoint ..."
196 m5.restoreCheckpoint(root, checkpoint_dir)
197 print "Done."
198 elif options.simpoint:
199 # assume workload 0 has the simpoint
166 m5.panic('no simpoint for testsys.cpu[%d].workload[0]' % i)
167 checkpoint_inst = int(testsys.cpu[i].workload[0].simpoint) + offset
168 testsys.cpu[i].max_insts_any_thread = checkpoint_inst
169 # used for output below
170 options.take_checkpoints = checkpoint_inst
171 else:
172 options.take_checkpoints = offset
173 # Set all test cpus with the right number of instructions

--- 18 unchanged lines hidden (view full) ---

192 m5.panic("Unable to find checkpoint directory %s" % \
193 checkpoint_dir)
194
195 print "Restoring checkpoint ..."
196 m5.restoreCheckpoint(root, checkpoint_dir)
197 print "Done."
198 elif options.simpoint:
199 # assume workload 0 has the simpoint
200 if testsys.cpu[0].workload[0].simpoint == None:
200 if testsys.cpu[0].workload[0].simpoint == 0:
201 m5.panic('Unable to find simpoint')
202
203 options.checkpoint_restore += \
204 int(testsys.cpu[0].workload[0].simpoint)
205
206 checkpoint_dir = joinpath(cptdir, "cpt.%s.%d" % \
207 (options.bench, options.checkpoint_restore))
208 if not exists(checkpoint_dir):

--- 154 unchanged lines hidden ---
201 m5.panic('Unable to find simpoint')
202
203 options.checkpoint_restore += \
204 int(testsys.cpu[0].workload[0].simpoint)
205
206 checkpoint_dir = joinpath(cptdir, "cpt.%s.%d" % \
207 (options.bench, options.checkpoint_restore))
208 if not exists(checkpoint_dir):

--- 154 unchanged lines hidden ---