Config: Use clock option in se/fs script and pass to switch_cpus
authorAndreas Hansson <andreas.hansson@arm.com>
Mon, 23 Jul 2012 13:32:22 +0000 (09:32 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Mon, 23 Jul 2012 13:32:22 +0000 (09:32 -0400)
This patch changes the se and fs script to use the clock option and
not simply set the CPUs clock to 2 GHz. It also makes a minor change
to the assignment of the switch_cpus clock to allow different clocks.

configs/common/Simulation.py
configs/example/fs.py
configs/example/se.py

index 58da9e968873dc50c5fa590c821d36f210870414..2ba691ed069e455866283602615a109f276209b9 100644 (file)
@@ -140,7 +140,7 @@ def run(options, root, testsys, cpu_class):
                 testsys.cpu[i].max_insts_any_thread = int(options.fast_forward)
             switch_cpus[i].system =  testsys
             switch_cpus[i].workload = testsys.cpu[i].workload
-            switch_cpus[i].clock = testsys.cpu[0].clock
+            switch_cpus[i].clock = testsys.cpu[i].clock
             # simulation period
             if options.maxinsts:
                 switch_cpus[i].max_insts_any_thread = options.maxinsts
@@ -167,8 +167,8 @@ def run(options, root, testsys, cpu_class):
             switch_cpus_1[i].system =  testsys
             switch_cpus[i].workload = testsys.cpu[i].workload
             switch_cpus_1[i].workload = testsys.cpu[i].workload
-            switch_cpus[i].clock = testsys.cpu[0].clock
-            switch_cpus_1[i].clock = testsys.cpu[0].clock
+            switch_cpus[i].clock = testsys.cpu[i].clock
+            switch_cpus_1[i].clock = testsys.cpu[i].clock
 
             # if restoring, make atomic cpu simulate only a few instructions
             if options.checkpoint_restore != None:
index a6d4869f39478884bf5424a02d6a84af5481ccc4..b0eb2f1ae0d2882ab672d7da442205fd218b2bee 100644 (file)
@@ -74,8 +74,8 @@ drive_mem_mode = 'atomic'
 # system under test can be any CPU
 (TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
 
-TestCPUClass.clock = '2GHz'
-DriveCPUClass.clock = '2GHz'
+TestCPUClass.clock = options.clock
+DriveCPUClass.clock = options.clock
 
 if options.benchmark:
     try:
index fa20c37db9f749fcd3e6628fb1c6a99189331230..009f650554a5c9c01b552b3700ac0e9e523a9176 100644 (file)
@@ -147,7 +147,7 @@ if options.cpu_type == "detailed" or options.cpu_type == "inorder":
     numThreads = len(workloads)
 
 (CPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
-CPUClass.clock = '2GHz'
+CPUClass.clock = options.clock
 CPUClass.numThreads = numThreads;
 
 np = options.num_cpus