Ruby.py (13774:a1be2a0c55f2) Ruby.py (13885:d10ea5e56cb0)
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
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
53
54from topologies import *
55from network import Network
56
57def define_options(parser):
58 # By default, ruby uses the simple timing cpu
59 parser.set_defaults(cpu_type="TimingSimpleCPU")
60

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

149 return topology
150
151def create_system(options, full_system, system, piobus = None, dma_ports = [],
152 bootmem=None):
153
154 system.ruby = RubySystem()
155 ruby = system.ruby
156
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
157 # Create the network object
158 (network, IntLinkClass, ExtLinkClass, RouterClass, InterfaceClass) = \
159 Network.create_network(options, ruby)
160 ruby.network = network
161
162 protocol = buildEnv['PROTOCOL']
163 exec("from . import %s" % protocol)
164 try:

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

169 except:
170 print("Error: could not create sytem for ruby protocol %s" % protocol)
171 raise
172
173 # Create the network topology
174 topology.makeTopology(options, network, IntLinkClass, ExtLinkClass,
175 RouterClass)
176
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
177 # Initialize network based on topology
178 Network.init_network(options, network, InterfaceClass)
179
180 # Create a port proxy for connecting the system port. This is
181 # independent of the protocol and kept in the protocol-agnostic
182 # part (i.e. here).
183 sys_port_proxy = RubyPortProxy(ruby_system = ruby)
184 if piobus is not None:

--- 61 unchanged lines hidden ---
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 ---