summaryrefslogtreecommitdiff
path: root/configs/topologies/Crossbar.py
diff options
context:
space:
mode:
authorTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:18 -0400
committerTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:18 -0400
commit003c08fa90f8b3eb7fbbbc96e0caa5f46bf58196 (patch)
tree13b408554ffbebd11ae2322e8a070a0c4d5b9c56 /configs/topologies/Crossbar.py
parentb9e23a6d741cdcdf0ffb7364c6aae36a487335ef (diff)
downloadgem5-003c08fa90f8b3eb7fbbbc96e0caa5f46bf58196.tar.xz
config: make internal links in network topology unidirectional.
This patch makes the internal links within the network topology unidirectional, thus allowing any deadlock-free routing algorithms to be specified from the topology itself using weights. This patch also renames Mesh.py and MeshDirCorners.py to Mesh_XY.py and MeshDirCorners_XY.py (Mesh with XY routing). It also adds a Mesh_westfirst.py and CrossbarGarnet.py topologies.
Diffstat (limited to 'configs/topologies/Crossbar.py')
-rw-r--r--configs/topologies/Crossbar.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/configs/topologies/Crossbar.py b/configs/topologies/Crossbar.py
index e3dd431e7..35d20de34 100644
--- a/configs/topologies/Crossbar.py
+++ b/configs/topologies/Crossbar.py
@@ -39,6 +39,7 @@ class Crossbar(SimpleTopology):
# the centralized crossbar. The large numbers of routers are needed
# because external links do not model outgoing bandwidth in the
# simple network, but internal links do.
+ # For garnet, one router suffices, use CrossbarGarnet.py
routers = [Router(router_id=i) for i in range(len(self.nodes)+1)]
xbar = routers[len(self.nodes)] # the crossbar router is the last router created
@@ -49,7 +50,18 @@ class Crossbar(SimpleTopology):
network.ext_links = ext_links
link_count = len(self.nodes)
- int_links = [IntLink(link_id=(link_count+i),
- node_a=routers[i], node_b=xbar)
- for i in range(len(self.nodes))]
+
+ int_links = []
+ for i in range(len(self.nodes)):
+ int_links.append(IntLink(link_id=(link_count+i),
+ src_node=routers[i],
+ dst_node=xbar))
+
+ link_count += len(self.nodes)
+
+ for i in range(len(self.nodes)):
+ int_links.append(IntLink(link_id=(link_count+i),
+ src_node=xbar,
+ dst_node=routers[i]))
+
network.int_links = int_links