From e9ae8b7d29e83fa2cad55006d2c6dc58115965cc Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 6 Sep 2013 16:21:33 -0500 Subject: 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. --- configs/ruby/Ruby.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'configs/ruby') 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") -- cgit v1.2.3