summaryrefslogtreecommitdiff
path: root/configs/ruby/Ruby.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-09-06 16:21:33 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-09-06 16:21:33 -0500
commite9ae8b7d29e83fa2cad55006d2c6dc58115965cc (patch)
treec418f84ec5ed77be77ca84de9517126b5cfa4ad6 /configs/ruby/Ruby.py
parent24dc914d8758464ed6d757cf2830456562686be0 (diff)
downloadgem5-e9ae8b7d29e83fa2cad55006d2c6dc58115965cc.tar.xz
ruby: network: correct naming of routers
The routers are created before the network class. This results in the routers becoming children of the first link they are connected to and they get generic names like int_node and node_b. This patch creates the network object first and passes it to the topology creation function. Now the routers are children of the network object and names are much more sensible.
Diffstat (limited to 'configs/ruby/Ruby.py')
-rw-r--r--configs/ruby/Ruby.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index e9a8a3c3f..0cd63b4f9 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -145,17 +145,12 @@ def create_system(options, system, piobus = None, dma_ports = []):
class ExtLinkClass(SimpleExtLink): pass
class RouterClass(Switch): pass
- #
- # Important: the topology must be instantiated before the network and after
- # the controllers. Hence the separation between topology definition and
- # instantiation.
- #
- routers, int_links, ext_links = topology.makeTopology(options,
- IntLinkClass, ExtLinkClass, RouterClass)
- network = NetworkClass(ruby_system = ruby, routers = routers,
- int_links = int_links, ext_links = ext_links,
- topology = topology.description)
+ # Create the network topology
+ network = NetworkClass(ruby_system = ruby, topology = topology.description,
+ routers = [], ext_links = [], int_links = [])
+ topology.makeTopology(options, network, IntLinkClass, ExtLinkClass,
+ RouterClass)
if options.network_fault_model:
assert(options.garnet_network == "fixed")