From aba56866d4cdde13e66798261611f786bed8d1a9 Mon Sep 17 00:00:00 2001 From: Gabriel Busnot Date: Mon, 10 Oct 2022 15:51:01 +0200 Subject: [PATCH] configs: Fix default CustomMesh for use with Garnet Garnet routers do not support 0 latency switches. Use 1 instead if the network is garnet. Change-Id: I09841a01eaf413bee0a1629307ecff0ae2bda948 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67660 Reviewed-by: Jason Lowe-Power Tested-by: kokoro Maintainer: Jason Lowe-Power --- configs/topologies/CustomMesh.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/topologies/CustomMesh.py b/configs/topologies/CustomMesh.py index c62b39a9c2..21fa2dcc13 100644 --- a/configs/topologies/CustomMesh.py +++ b/configs/topologies/CustomMesh.py @@ -171,7 +171,9 @@ class CustomMesh(SimpleTopology): def _createRNFRouter(self, mesh_router): # Create a zero-latency router bridging node controllers # and the mesh router - node_router = self._Router(router_id=len(self._routers), latency=0) + node_router = self._Router( + router_id=len(self._routers), latency=self.node_router_latency + ) self._routers.append(node_router) # connect node_router <-> mesh router @@ -270,6 +272,7 @@ class CustomMesh(SimpleTopology): self._ExtLink = ExtLink self._Router = Router + self.node_router_latency = 1 if options.network == "garnet" else 0 if hasattr(options, "router_link_latency"): self._router_link_latency = options.router_link_latency self._node_link_latency = options.node_link_latency