Config: Move setWorkCountOptions() to Simulation.py
authorNilay Vaish <nilay@cs.wisc.edu>
Tue, 27 Mar 2012 23:23:21 +0000 (18:23 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Tue, 27 Mar 2012 23:23:21 +0000 (18:23 -0500)
The function is presently defined in FSConfig.py, which does not seem to be
the correct place for it.

configs/common/FSConfig.py
configs/common/Simulation.py
configs/example/fs.py
configs/example/ruby_fs.py

index a11061fdd7b5de47d8c89c5b481811291c557966..4c2d0a66cfb2193c943ddd7ddc637f0c150328c6 100644 (file)
@@ -510,23 +510,6 @@ def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None, Ruby = False
     self.intel_mp_table.base_entries = base_entries
     self.intel_mp_table.ext_entries = ext_entries
 
-def setWorkCountOptions(system, options):
-    if options.work_item_id != None:
-        system.work_item_id = options.work_item_id
-    if options.work_begin_cpu_id_exit != None:
-        system.work_begin_cpu_id_exit = options.work_begin_cpu_id_exit
-    if options.work_end_exit_count != None:
-        system.work_end_exit_count = options.work_end_exit_count
-    if options.work_end_checkpoint_count != None:
-        system.work_end_ckpt_count = options.work_end_checkpoint_count
-    if options.work_begin_exit_count != None:
-        system.work_begin_exit_count = options.work_begin_exit_count
-    if options.work_begin_checkpoint_count != None:
-        system.work_begin_ckpt_count = options.work_begin_checkpoint_count
-    if options.work_cpus_checkpoint_count != None:
-        system.work_cpus_ckpt_count = options.work_cpus_checkpoint_count
-
-
 def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
     self = LinuxX86System()
 
index b7c2c0fc0fe65545165609669394a3dcb80279f0..58da9e968873dc50c5fa590c821d36f210870414 100644 (file)
@@ -80,6 +80,21 @@ def setCPUClass(options):
 
     return (TmpClass, test_mem_mode, CPUClass)
 
+def setWorkCountOptions(system, options):
+    if options.work_item_id != None:
+        system.work_item_id = options.work_item_id
+    if options.work_begin_cpu_id_exit != None:
+        system.work_begin_cpu_id_exit = options.work_begin_cpu_id_exit
+    if options.work_end_exit_count != None:
+        system.work_end_exit_count = options.work_end_exit_count
+    if options.work_end_checkpoint_count != None:
+        system.work_end_ckpt_count = options.work_end_checkpoint_count
+    if options.work_begin_exit_count != None:
+        system.work_begin_exit_count = options.work_begin_exit_count
+    if options.work_begin_checkpoint_count != None:
+        system.work_begin_ckpt_count = options.work_begin_checkpoint_count
+    if options.work_cpus_checkpoint_count != None:
+        system.work_cpus_ckpt_count = options.work_cpus_checkpoint_count
 
 def run(options, root, testsys, cpu_class):
     if options.maxtick:
index 98e5147fc021e639fa4e7b52188d8a9e5c2f5752..8b27f25c1e8b916e37131b8e6853f5051aff6b41 100644 (file)
@@ -133,12 +133,12 @@ elif buildEnv['TARGET_ISA'] == "sparc":
     test_sys = makeSparcSystem(test_mem_mode, bm[0])
 elif buildEnv['TARGET_ISA'] == "x86":
     test_sys = makeLinuxX86System(test_mem_mode, options.num_cpus, bm[0])
-    setWorkCountOptions(test_sys, options)
+    Simulation.setWorkCountOptions(test_sys, options)
 elif buildEnv['TARGET_ISA'] == "arm":
     test_sys = makeArmSystem(test_mem_mode,
             options.machine_type, bm[0],
             bare_metal=options.bare_metal)
-    setWorkCountOptions(test_sys, options)
+    Simulation.setWorkCountOptions(test_sys, options)
 else:
     fatal("incapable of building non-alpha or non-sparc full system!")
 
index 8de05897e99b1da5bead03caa3ba0f6018dfe917..ac7587bf50f60fd493ffd6122243af68c8482b75 100644 (file)
@@ -106,7 +106,7 @@ if buildEnv['TARGET_ISA'] == "alpha":
     system = makeLinuxAlphaRubySystem(test_mem_mode, bm[0])
 elif buildEnv['TARGET_ISA'] == "x86":
     system = makeLinuxX86System(test_mem_mode, options.num_cpus, bm[0], True)
-    setWorkCountOptions(system, options)
+    Simulation.setWorkCountOptions(system, options)
 else:
     fatal("incapable of building non-alpha or non-x86 full system!")