1# Copyright (c) 2012, 2017-2018 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

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

45import m5
46from m5.objects import *
47from m5.defines import buildEnv
48from m5.util import addToPath, fatal
49
50addToPath('../')
51
52from common import MemConfig
53from common import FileSystemConfig
54
55from topologies import *
56from network import Network
57
58def define_options(parser):
59 # By default, ruby uses the simple timing cpu
60 parser.set_defaults(cpu_type="TimingSimpleCPU")
61

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

150 return topology
151
152def create_system(options, full_system, system, piobus = None, dma_ports = [],
153 bootmem=None):
154
155 system.ruby = RubySystem()
156 ruby = system.ruby
157
158 # Generate pseudo filesystem
159 FileSystemConfig.config_filesystem(options)
160
161 # Create the network object
162 (network, IntLinkClass, ExtLinkClass, RouterClass, InterfaceClass) = \
163 Network.create_network(options, ruby)
164 ruby.network = network
165
166 protocol = buildEnv['PROTOCOL']
167 exec("from . import %s" % protocol)
168 try:

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

173 except:
174 print("Error: could not create sytem for ruby protocol %s" % protocol)
175 raise
176
177 # Create the network topology
178 topology.makeTopology(options, network, IntLinkClass, ExtLinkClass,
179 RouterClass)
180
181 # Register the topology elements with faux filesystem (SE mode only)
182 if not full_system:
183 topology.registerTopology(options)
184
185
186 # Initialize network based on topology
187 Network.init_network(options, network, InterfaceClass)
188
189 # Create a port proxy for connecting the system port. This is
190 # independent of the protocol and kept in the protocol-agnostic
191 # part (i.e. here).
192 sys_port_proxy = RubyPortProxy(ruby_system = ruby)
193 if piobus is not None:

--- 61 unchanged lines hidden ---