# 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
class System(SimObject):
type = 'System'
- swig_objdecls = [ '%include "python/swig/system.i"' ]
- physmem = Param.PhysicalMemory(Parent.any, "physical memory")
+ @classmethod
+ def export_method_cxx_predecls(cls, code):
+ code('#include "sim/system.hh"')
+
+ @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")
+ 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,