Files
gem5/src/mem/ruby/network/topologies/TopologyCreator.py
Brad Beckmann 11b725c19d ruby: changes how Topologies are created
Instead of just passing a list of controllers to the makeTopology function
in src/mem/ruby/network/topologies/<Topo>.py we pass in a function pointer
which knows how to make the topology, possibly with some extra state set
in the configs/ruby/<protocol>.py file. Thus, we can move all of the files
from network/topologies to configs/topologies. A new class BaseTopology
is added which all topologies in configs/topologies must inheirit from and
follow its API.

--HG--
rename : src/mem/ruby/network/topologies/Crossbar.py => configs/topologies/Crossbar.py
rename : src/mem/ruby/network/topologies/Mesh.py => configs/topologies/Mesh.py
rename : src/mem/ruby/network/topologies/MeshDirCorners.py => configs/topologies/MeshDirCorners.py
rename : src/mem/ruby/network/topologies/Pt2Pt.py => configs/topologies/Pt2Pt.py
rename : src/mem/ruby/network/topologies/Torus.py => configs/topologies/Torus.py
2012-07-10 22:51:53 -07:00

20 lines
392 B
Python

from m5.params import *
from m5.objects import *
def instantiateTopology(topology, options, IntLink, ExtLink, Router):
topo = Topology()
topo.description = topology.description
routers, int_links, ext_links = topology.makeTopology(options, IntLink, ExtLink, Router)
topo.routers = routers
topo.int_links = int_links
topo.ext_links = ext_links
return topo