System.py (11839:dd6df2e47c14) System.py (11988:665cd5f8b52b)
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# Copyright (c) 2011 Regents of the University of California
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 14 unchanged lines hidden (view full) ---

23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Authors: Nathan Binkert
29# Rick Strong
30
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# Copyright (c) 2011 Regents of the University of California
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 14 unchanged lines hidden (view full) ---

23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Authors: Nathan Binkert
29# Rick Strong
30
31from m5.SimObject import SimObject
31from m5.SimObject import *
32from m5.defines import buildEnv
33from m5.params import *
34from m5.proxy import *
35
36from DVFSHandler import *
37from SimpleMemory import *
38
39class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing',
40 'atomic_noncaching']
41
42class System(MemObject):
43 type = 'System'
44 cxx_header = "sim/system.hh"
45 system_port = MasterPort("System port")
46
32from m5.defines import buildEnv
33from m5.params import *
34from m5.proxy import *
35
36from DVFSHandler import *
37from SimpleMemory import *
38
39class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing',
40 'atomic_noncaching']
41
42class System(MemObject):
43 type = 'System'
44 cxx_header = "sim/system.hh"
45 system_port = MasterPort("System port")
46
47 @classmethod
48 def export_methods(cls, code):
49 code('''
50 Enums::MemoryMode getMemoryMode() const;
51 void setMemoryMode(Enums::MemoryMode mode);
52''')
47 cxx_exports = [
48 PyBindMethod("getMemoryMode"),
49 PyBindMethod("setMemoryMode"),
50 ]
53
54 memories = VectorParam.AbstractMemory(Self.all,
55 "All memories in the system")
56 mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
57
58 thermal_model = Param.ThermalModel(NULL, "Thermal model")
59 thermal_components = VectorParam.SimObject([],
60 "A collection of all thermal components in the system.")

--- 52 unchanged lines hidden ---
51
52 memories = VectorParam.AbstractMemory(Self.all,
53 "All memories in the system")
54 mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
55
56 thermal_model = Param.ThermalModel(NULL, "Thermal model")
57 thermal_components = VectorParam.SimObject([],
58 "A collection of all thermal components in the system.")

--- 52 unchanged lines hidden ---