From: Gabe Black Date: Fri, 6 Sep 2019 22:14:49 +0000 (-0700) Subject: python: Make the dot writer handle unconnected Port vector elements. X-Git-Tag: v19.0.0.0~569 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e87a293d1ffa6da38ba8fa145e7dc5128138ab77;p=gem5.git 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 --- 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):