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 <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Gabriel Busnot
2022-10-10 15:51:01 +02:00
committed by Gabriel B.
parent 20dd444273
commit d79941df7a

View File

@@ -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