Config: Enable using O3 CPU and Ruby in SE mode
[gem5.git] / src / sim / System.py
index 5712a5c03d24a4d7caa4aac2d004e41821a1e63f..d34a043c1ebabec380b61f70b566ebc877ff9060 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright (c) 2005-2007 The Regents of The University of Michigan
+# Copyright (c) 2011 Regents of the University of California
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 # Authors: Nathan Binkert
+#          Rick Strong
 
 from m5.SimObject import SimObject
+from m5.defines import buildEnv
 from m5.params import *
 from m5.proxy import *
-from m5 import build_env
+
 from PhysicalMemory import *
 
 class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
 
-class System(SimObject):
+class System(MemObject):
     type = 'System'
-    swig_objdecls = [ '%include "python/swig/system.i"' ]
+    system_port = Port("System port")
+
+    @classmethod
+    def export_method_cxx_predecls(cls, code):
+        code('#include "sim/system.hh"')
 
-    physmem = Param.PhysicalMemory(Parent.any, "phsyical memory")
+    @classmethod
+    def export_methods(cls, code):
+        code('''
+      Enums::MemoryMode getMemoryMode();
+      void setMemoryMode(Enums::MemoryMode mode);
+''')
+
+    physmem = Param.PhysicalMemory("Physical Memory")
     mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
-    if build_env['FULL_SYSTEM']:
+    memories = VectorParam.PhysicalMemory(Self.all, "All memories is the system")
+    work_item_id = Param.Int(-1, "specific work item id")
+    num_work_ids = Param.Int(16, "Number of distinct work item types")
+    work_begin_cpu_id_exit = Param.Int(-1,
+        "work started on specific id, now exit simulation")
+    work_begin_ckpt_count = Param.Counter(0,
+        "create checkpoint when work items begin count value is reached")
+    work_begin_exit_count = Param.Counter(0,
+        "exit simulation when work items begin count value is reached")
+    work_end_ckpt_count = Param.Counter(0,
+        "create checkpoint when work items end count value is reached")
+    work_end_exit_count = Param.Counter(0,
+        "exit simulation when work items end count value is reached")
+    work_cpus_ckpt_count = Param.Counter(0,
+        "create checkpoint when active cpu count value is reached")
+
+    if buildEnv['FULL_SYSTEM']:
         abstract = True
         boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
                                              "boot processor frequency")
@@ -49,3 +79,5 @@ class System(SimObject):
         kernel = Param.String("", "file that contains the kernel code")
         readfile = Param.String("", "file to read startup script from")
         symbolfile = Param.String("", "file to get the symbols from")
+        load_addr_mask = Param.UInt64(0xffffffffff,
+                "Address to mask loading binaries with");