Deleted Added
sdiff udiff text old ( 9494:50da272a1300 ) new ( 9518:8faae62af8c3 )
full compact
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;

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

59
60 Restoring from a checkpoint or fast forwarding through a benchmark
61 can be done using one type of cpu, and then the actual
62 simulation can be carried out using another type. This function
63 returns these two types of cpus and the initial mode of operation
64 depending on the options provided.
65 """
66
67 if options.cpu_type == "detailed" or \
68 options.cpu_type == "arm_detailed" or \
69 options.cpu_type == "inorder" :
70 if not options.caches and not options.ruby:
71 fatal("O3/Inorder CPU must be used with caches")
72
73 TmpClass, test_mem_mode = getCPUClass(options.cpu_type)
74 CPUClass = None
75
76 if options.checkpoint_restore != None:
77 if options.restore_with_cpu != options.cpu_type:
78 CPUClass = TmpClass
79 TmpClass, test_mem_mode = getCPUClass(options.restore_with_cpu)
80 elif options.fast_forward:
81 CPUClass = TmpClass
82 TmpClass = AtomicSimpleCPU

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

312 # Add checker cpu if selected
313 if options.checker:
314 switch_cpus[i].addCheckerCpu()
315
316 testsys.switch_cpus = switch_cpus
317 switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)]
318
319 if options.repeat_switch:
320 if options.cpu_type == "arm_detailed":
321 if not options.caches:
322 print "O3 CPU must be used with caches"
323 sys.exit(1)
324
325 repeat_switch_cpus = [O3_ARM_v7a_3(switched_out=True, \
326 cpu_id=(i)) for i in xrange(np)]
327 elif options.cpu_type == "detailed":
328 if not options.caches:
329 print "O3 CPU must be used with caches"
330 sys.exit(1)
331
332 repeat_switch_cpus = [DerivO3CPU(switched_out=True, \
333 cpu_id=(i)) for i in xrange(np)]
334 elif options.cpu_type == "inorder":
335 print "inorder CPU switching not supported"
336 sys.exit(1)
337 elif options.cpu_type == "timing":
338 repeat_switch_cpus = [TimingSimpleCPU(switched_out=True, \
339 cpu_id=(i)) for i in xrange(np)]
340 else:
341 repeat_switch_cpus = [AtomicSimpleCPU(switched_out=True, \
342 cpu_id=(i)) for i in xrange(np)]
343
344 for i in xrange(np):
345 repeat_switch_cpus[i].system = testsys
346 repeat_switch_cpus[i].workload = testsys.cpu[i].workload
347 repeat_switch_cpus[i].clock = testsys.cpu[i].clock
348
349 if options.maxinsts:
350 repeat_switch_cpus[i].max_insts_any_thread = options.maxinsts
351

--- 160 unchanged lines hidden ---