BaseCPU.py (9480:d059f8a95a42) BaseCPU.py (9518:8faae62af8c3)
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

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

95 def export_methods(cls, code):
96 code('''
97 void switchOut();
98 void takeOverFrom(BaseCPU *cpu);
99 bool switchedOut();
100 void flushTLBs();
101''')
102
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

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

95 def export_methods(cls, code):
96 code('''
97 void switchOut();
98 void takeOverFrom(BaseCPU *cpu);
99 bool switchedOut();
100 void flushTLBs();
101''')
102
103 @classmethod
104 def memory_mode(cls):
105 """Which memory mode does this CPU require?"""
106 return 'invalid'
107
108 @classmethod
109 def require_caches(cls):
110 """Does the CPU model require caches?
111
112 Some CPU models might make assumptions that require them to
113 have caches.
114 """
115 return False
116
117 @classmethod
118 def support_take_over(cls):
119 """Does the CPU model support CPU takeOverFrom?"""
120 return False
121
103 def takeOverFrom(self, old_cpu):
104 self._ccObject.takeOverFrom(old_cpu._ccObject)
105
106
107 system = Param.System(Parent.any, "system object")
108 cpu_id = Param.Int(-1, "CPU identifier")
109 numThreads = Param.Unsigned(1, "number of HW thread contexts")
110

--- 164 unchanged lines hidden ---
122 def takeOverFrom(self, old_cpu):
123 self._ccObject.takeOverFrom(old_cpu._ccObject)
124
125
126 system = Param.System(Parent.any, "system object")
127 cpu_id = Param.Int(-1, "CPU identifier")
128 numThreads = Param.Unsigned(1, "number of HW thread contexts")
129

--- 164 unchanged lines hidden ---