- #
- # Set the network classes based on the command line options
- #
- if options.garnet_network == "fixed":
- class NetworkClass(GarnetNetwork_d): pass
- class IntLinkClass(GarnetIntLink_d): pass
- class ExtLinkClass(GarnetExtLink_d): pass
- class RouterClass(GarnetRouter_d): pass
- elif options.garnet_network == "flexible":
- class NetworkClass(GarnetNetwork): pass
- class IntLinkClass(GarnetIntLink): pass
- class ExtLinkClass(GarnetExtLink): pass
- class RouterClass(GarnetRouter): pass
- else:
- class NetworkClass(SimpleNetwork): pass
- class IntLinkClass(SimpleIntLink): pass
- 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.
- #
- # gem5 SimObject defined in src/mem/ruby/network/Network.py
- net_topology = Topology()
- net_topology.description = topology.description
-
- routers, int_links, ext_links = topology.makeTopology(options,
- IntLinkClass, ExtLinkClass, RouterClass)
-
- net_topology.routers = routers
- net_topology.int_links = int_links
- net_topology.ext_links = ext_links
-