BaseCPU.py (9180:ee8d7a51651d) BaseCPU.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

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

72elif buildEnv['TARGET_ISA'] == 'power':
73 from PowerTLB import PowerTLB
74 from PowerInterrupts import PowerInterrupts
75
76class BaseCPU(MemObject):
77 type = 'BaseCPU'
78 abstract = True
79
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

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

72elif buildEnv['TARGET_ISA'] == 'power':
73 from PowerTLB import PowerTLB
74 from PowerInterrupts import PowerInterrupts
75
76class BaseCPU(MemObject):
77 type = 'BaseCPU'
78 abstract = True
79
80 @classmethod
81 def export_method_cxx_predecls(cls, code):
82 code('#include "cpu/base.hh"')
83
84
85 @classmethod
86 def export_methods(cls, code):
87 code('''
88 void switchOut();
89 void takeOverFrom(BaseCPU *cpu);
90''')
91
92 def takeOverFrom(self, old_cpu):
93 self._ccObject.takeOverFrom(old_cpu._ccObject)
94
95
80 system = Param.System(Parent.any, "system object")
81 cpu_id = Param.Int(-1, "CPU identifier")
82 numThreads = Param.Unsigned(1, "number of HW thread contexts")
83
84 function_trace = Param.Bool(False, "Enable function trace")
85 function_trace_start = Param.Tick(0, "Tick to start function trace")
86
87 checker = Param.BaseCPU(NULL, "checker CPU")

--- 143 unchanged lines hidden ---
96 system = Param.System(Parent.any, "system object")
97 cpu_id = Param.Int(-1, "CPU identifier")
98 numThreads = Param.Unsigned(1, "number of HW thread contexts")
99
100 function_trace = Param.Bool(False, "Enable function trace")
101 function_trace_start = Param.Tick(0, "Tick to start function trace")
102
103 checker = Param.BaseCPU(NULL, "checker CPU")

--- 143 unchanged lines hidden ---