Deleted Added
sdiff udiff text old ( 9494:50da272a1300 ) new ( 9518:8faae62af8c3 )
full compact
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
9# terms below provided that you ensure that this notice is replicated
10# unmodified and in its entirety in all distributions of the software,
11# modified or unmodified, in source code or in binary form.
12#
13# Copyright (c) 2006-2008 The Regents of The University of Michigan
14# Copyright (c) 2010 Advanced Micro Devices, Inc.
15# All rights reserved.
16#
17# Redistribution and use in source and binary forms, with or without
18# modification, are permitted provided that the following conditions are
19# met: redistributions of source code must retain the above copyright
20# notice, this list of conditions and the following disclaimer;

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

71
72 Restoring from a checkpoint or fast forwarding through a benchmark
73 can be done using one type of cpu, and then the actual
74 simulation can be carried out using another type. This function
75 returns these two types of cpus and the initial mode of operation
76 depending on the options provided.
77 """
78
79 TmpClass, test_mem_mode = getCPUClass(options.cpu_type)
80 CPUClass = None
81 if TmpClass.require_caches() and \
82 not options.caches and not options.ruby:
83 fatal("%s must be used with caches" % options.cpu_type)
84
85 if options.checkpoint_restore != None:
86 if options.restore_with_cpu != options.cpu_type:
87 CPUClass = TmpClass
88 TmpClass, test_mem_mode = getCPUClass(options.restore_with_cpu)
89 elif options.fast_forward:
90 CPUClass = TmpClass
91 TmpClass = AtomicSimpleCPU

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

321 # Add checker cpu if selected
322 if options.checker:
323 switch_cpus[i].addCheckerCpu()
324
325 testsys.switch_cpus = switch_cpus
326 switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)]
327
328 if options.repeat_switch:
329 switch_class = getCPUClass(options.cpu_type)[0]
330 if switch_class.require_caches() and \
331 not options.caches:
332 print "%s: Must be used with caches" % str(switch_class)
333 sys.exit(1)
334 if not switch_class.support_take_over():
335 print "%s: CPU switching not supported" % str(switch_class)
336 sys.exit(1)
337
338 repeat_switch_cpus = [switch_class(switched_out=True, \
339 cpu_id=(i)) for i in xrange(np)]
340
341 for i in xrange(np):
342 repeat_switch_cpus[i].system = testsys
343 repeat_switch_cpus[i].workload = testsys.cpu[i].workload
344 repeat_switch_cpus[i].clock = testsys.cpu[i].clock
345
346 if options.maxinsts:
347 repeat_switch_cpus[i].max_insts_any_thread = options.maxinsts
348

--- 160 unchanged lines hidden ---