34,35d33
< addToPath('../ruby/networks')
< from MeshDirCorners import *
37,40d34
< protocol = buildEnv['PROTOCOL']
<
< exec "import %s" % protocol
<
42a37,38
> protocol = buildEnv['PROTOCOL']
> exec "import %s" % protocol
52,53c48,49
< # Important: the topology constructor must be called before the network
< # constructor.
---
> # Important: the topology must be created before the network and after the
> # controllers.
55,63c51,56
< if options.topology == "crossbar":
< net_topology = makeCrossbar(all_cntrls)
< elif options.topology == "mesh":
< #
< # The uniform mesh topology assumes one router per cpu
< #
< net_topology = makeMesh(all_cntrls,
< len(cpu_sequencers),
< options.mesh_rows)
---
> exec "import %s" % options.topology
> try:
> net_topology = eval("%s.makeTopology(all_cntrls, options)" % options.topology)
> except:
> print "Error: could not create topology %s" % options.topology
> sys.exit(1)
65,72d57
< elif options.topology == "mesh_dir_corner":
< #
< # The uniform mesh topology assumes one router per cpu
< #
< net_topology = makeMeshDirCorners(all_cntrls,
< len(cpu_sequencers),
< options.mesh_rows)
<