From ae266b3a8575ca0a43c86b12cd451c3372e9c623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20M=C3=BCck?= Date: Mon, 21 Jun 2021 07:56:46 -0500 Subject: [PATCH] configs: fix CustomMesh router parent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the routers being set as the links' children. This is necessary here as we only assign the routers to the network once all routers and links are created. Change-Id: I2ac90b575bad593ddbb8ab716872a30a5c4c6979 Signed-off-by: Tiago Mück Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63677 Maintainer: Bobby Bruce Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- configs/topologies/CustomMesh.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/topologies/CustomMesh.py b/configs/topologies/CustomMesh.py index 545ba4b326..088e4b9cfe 100644 --- a/configs/topologies/CustomMesh.py +++ b/configs/topologies/CustomMesh.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 ARM Limited +# Copyright (c) 2021,2022 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -372,6 +372,10 @@ class CustomMesh(SimpleTopology): # Set up network.int_links = self._int_links network.ext_links = self._ext_links + # fix Routers being set as link child + for r in self._routers: + if r.has_parent(): + r.get_parent().clear_child(r.get_name()) network.routers = self._routers pairing = getattr(options, "pairing", None)