From e87a293d1ffa6da38ba8fa145e7dc5128138ab77 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 6 Sep 2019 15:14:49 -0700 Subject: [PATCH] python: Make the dot writer handle unconnected Port vector elements. Change-Id: I5234013716cdcce5fc39e239dc3d92cd1f2b7799 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20699 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black Tested-by: kokoro --- src/python/m5/util/dot_writer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/m5/util/dot_writer.py b/src/python/m5/util/dot_writer.py index d1fe94653..bc5544a22 100644 --- a/src/python/m5/util/dot_writer.py +++ b/src/python/m5/util/dot_writer.py @@ -117,10 +117,12 @@ def dot_create_edges(simNode, callgraph): port_node = dot_create_node(simNode, full_port_name, port_name) # create edges if isinstance(port, PortRef): - dot_add_edge(simNode, callgraph, full_port_name, port) + if port.peer: + dot_add_edge(simNode, callgraph, full_port_name, port) else: for p in port.elements: - dot_add_edge(simNode, callgraph, full_port_name, p) + if p.peer: + dot_add_edge(simNode, callgraph, full_port_name, p) # recurse to children for child in simnode_children(simNode): -- 2.30.2