summaryrefslogtreecommitdiff
path: root/configs/topologies/Pt2Pt.py
diff options
context:
space:
mode:
authorTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:22 -0400
committerTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:22 -0400
commitdbe8892b761067c5c1e828f889a513ea085b044f (patch)
treed3101cc8dbf74f1d3bc2f3f9ead1b948fd4ac33e /configs/topologies/Pt2Pt.py
parentb512f4bf71fac79fb6e17bb2a9e05c1f494f69f4 (diff)
downloadgem5-dbe8892b761067c5c1e828f889a513ea085b044f.tar.xz
ruby: garnet2.0
Revamped version of garnet with more optimized single-cycle routers, more configurability, and cleaner code.
Diffstat (limited to 'configs/topologies/Pt2Pt.py')
-rw-r--r--configs/topologies/Pt2Pt.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/configs/topologies/Pt2Pt.py b/configs/topologies/Pt2Pt.py
index 006d00c2f..6cbf5ad85 100644
--- a/configs/topologies/Pt2Pt.py
+++ b/configs/topologies/Pt2Pt.py
@@ -42,11 +42,22 @@ class Pt2Pt(SimpleTopology):
def makeTopology(self, options, network, IntLink, ExtLink, Router):
nodes = self.nodes
- # Create an individual router for each controller, and connect all to all.
- routers = [Router(router_id=i) for i in range(len(nodes))]
+ # default values for link latency and router latency.
+ # Can be over-ridden on a per link/router basis
+ link_latency = options.link_latency # used by simple and garnet
+ router_latency = options.router_latency # only used by garnet
+
+ # Create an individual router for each controller,
+ # and connect all to all.
+ # Since this is a high-radix router, router_latency should
+ # accordingly be set to a higher value than the default
+ # (which is 1 for mesh routers)
+ routers = [Router(router_id=i, latency = router_latency) \
+ for i in range(len(nodes))]
network.routers = routers
- ext_links = [ExtLink(link_id=i, ext_node=n, int_node=routers[i])
+ ext_links = [ExtLink(link_id=i, ext_node=n, int_node=routers[i],
+ latency = link_latency)
for (i, n) in enumerate(nodes)]
network.ext_links = ext_links
@@ -58,6 +69,7 @@ class Pt2Pt(SimpleTopology):
link_count += 1
int_links.append(IntLink(link_id=link_count,
src_node=routers[i],
- dst_node=routers[j]))
+ dst_node=routers[j],
+ latency = link_latency))
network.int_links = int_links