Configs: Change Simulation.py to return a subclass of the CPU models rather than...
authorAli Saidi <saidi@eecs.umich.edu>
Thu, 14 Feb 2008 21:13:50 +0000 (16:13 -0500)
committerAli Saidi <saidi@eecs.umich.edu>
Thu, 14 Feb 2008 21:13:50 +0000 (16:13 -0500)
--HG--
extra : convert_revision : f972207c616590a60a6e103daa5de469cf124b44

configs/common/Simulation.py

index 1ff36c5d0d4529291028c605d3b44bd0c2d64065..cea391c5d0c8a5ac69cf4f03d74d7fa8fa8d4b25 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006-2007 The Regents of The University of Michigan
+# Copyright (c) 2006-2008 The Regents of The University of Michigan
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -37,14 +37,14 @@ def setCPUClass(options):
 
     atomic = False
     if options.timing:
-        TmpClass = TimingSimpleCPU
+        class TmpClass(TimingSimpleCPU): pass
     elif options.detailed:
         if not options.caches:
             print "O3 CPU must be used with caches"
             sys.exit(1)
-        TmpClass = DerivO3CPU
+        class TmpClass(DerivO3CPU): pass
     else:
-        TmpClass = AtomicSimpleCPU
+        class TmpClass(AtomicSimpleCPU): pass
         atomic = True
 
     CPUClass = None
@@ -53,7 +53,7 @@ def setCPUClass(options):
     if not atomic:
         if options.checkpoint_restore:
             CPUClass = TmpClass
-            TmpClass = AtomicSimpleCPU
+            class TmpClass(AtomicSimpleCPU): pass
         else:
             test_mem_mode = 'timing'