summaryrefslogtreecommitdiff
path: root/configs/topologies/Pt2Pt.py
diff options
context:
space:
mode:
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