SimObject.py (9253:e0d2a8e9f445) SimObject.py (9254:f1b35c618252)
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

597 void loadState(Checkpoint *cp);
598 void initState();
599 void regStats();
600 void resetStats();
601 void startup();
602
603 unsigned int drain(Event *drain_event);
604 void resume();
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

597 void loadState(Checkpoint *cp);
598 void initState();
599 void regStats();
600 void resetStats();
601 void startup();
602
603 unsigned int drain(Event *drain_event);
604 void resume();
605 void switchOut();
606 void takeOverFrom(BaseCPU *cpu);
607''')
608
609 # Initialize new instance. For objects with SimObject-valued
610 # children, we need to recursively clone the classes represented
611 # by those param values as well in a consistent "deep copy"-style
612 # fashion. That is, we want to make sure that each instance is
613 # cloned only once, and that if there are multiple references to
614 # the same original object, we end up with the corresponding

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

1045 return self.getCCObject()
1046
1047 # Create C++ port connections corresponding to the connections in
1048 # _port_refs
1049 def connectPorts(self):
1050 for portRef in self._port_refs.itervalues():
1051 portRef.ccConnect()
1052
605''')
606
607 # Initialize new instance. For objects with SimObject-valued
608 # children, we need to recursively clone the classes represented
609 # by those param values as well in a consistent "deep copy"-style
610 # fashion. That is, we want to make sure that each instance is
611 # cloned only once, and that if there are multiple references to
612 # the same original object, we end up with the corresponding

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

1043 return self.getCCObject()
1044
1045 # Create C++ port connections corresponding to the connections in
1046 # _port_refs
1047 def connectPorts(self):
1048 for portRef in self._port_refs.itervalues():
1049 portRef.ccConnect()
1050
1053 def takeOverFrom(self, old_cpu):
1054 self._ccObject.takeOverFrom(old_cpu._ccObject)
1055
1056# Function to provide to C++ so it can look up instances based on paths
1057def resolveSimObject(name):
1058 obj = instanceDict[name]
1059 return obj.getCCObject()
1060
1061def isSimObject(value):
1062 return isinstance(value, SimObject)
1063

--- 52 unchanged lines hidden ---
1051# Function to provide to C++ so it can look up instances based on paths
1052def resolveSimObject(name):
1053 obj = instanceDict[name]
1054 return obj.getCCObject()
1055
1056def isSimObject(value):
1057 return isinstance(value, SimObject)
1058

--- 52 unchanged lines hidden ---