Deleted Added
sdiff udiff text old ( 9790:ccc428657233 ) new ( 9792:c02004c2cc5b )
full compact
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
9# terms below provided that you ensure that this notice is replicated

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

29# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35#
36# Authors: Andreas Sandberg
37
38from abc import ABCMeta, abstractmethod
39import m5
40from m5.objects import *
41from m5.proxy import *
42m5.util.addToPath('../configs/common')
43import FSConfig
44from Caches import *

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

51 This class provides some basic functionality for creating an ARM
52 system with the usual peripherals (caches, GIC, etc.). It allows
53 customization by defining separate methods for different parts of
54 the initialization process.
55 """
56
57 __metaclass__ = ABCMeta
58
59 def __init__(self, mem_mode='timing', cpu_class=TimingSimpleCPU,
60 num_cpus=1, checker=False):
61 """Initialize a simple ARM system.
62
63 Keyword Arguments:
64 mem_mode -- String describing the memory mode (timing or atomic)
65 cpu_class -- CPU class to use
66 num_cpus -- Number of CPUs to instantiate
67 checker -- Set to True to add checker CPUs
68 """
69 self.mem_mode = mem_mode
70 self.cpu_class = cpu_class
71 self.num_cpus = num_cpus
72 self.checker = checker
73
74 def create_cpus(self):
75 """Return a list of CPU objects to add to a system."""
76 cpus = [ self.cpu_class(cpu_id=i, clock='2GHz')
77 for i in range(self.num_cpus) ]

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

148 pass
149
150 @abstractmethod
151 def create_root(self):
152 """Create and return a simulation root using the system
153 defined by this class."""
154 pass
155
156class BaseFSSystem(BaseSystem):
157 """Basic full system builder."""
158
159 def __init__(self, **kwargs):
160 BaseSystem.__init__(self, **kwargs)
161
162 def init_system(self, system):
163 BaseSystem.init_system(self, system)

--- 41 unchanged lines hidden ---