diff options
author | Sascha Bischoff <sascha.bischoff@arm.com> | 2014-04-23 05:18:25 -0400 |
---|---|---|
committer | Sascha Bischoff <sascha.bischoff@arm.com> | 2014-04-23 05:18:25 -0400 |
commit | 2031c03c09ad3753e53fa29a6555fdf288c821e2 (patch) | |
tree | f1a885a73f2bf26908f197395005b57a1111bbbc /src/python/m5 | |
parent | e4086878f62f5eacb84b9bf2183975e92ff564f5 (diff) | |
download | gem5-2031c03c09ad3753e53fa29a6555fdf288c821e2.tar.xz |
misc: Proper type check and import for PortRef
Rewriting the type checking around PortRef, which was interacting strangely
with other Python scripts.
Tested-by: stephan.diestelhorst@arm.com
Diffstat (limited to 'src/python/m5')
-rw-r--r-- | src/python/m5/util/dot_writer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/m5/util/dot_writer.py b/src/python/m5/util/dot_writer.py index a6f721a0c..ab4687f7f 100644 --- a/src/python/m5/util/dot_writer.py +++ b/src/python/m5/util/dot_writer.py @@ -58,6 +58,7 @@ import m5, os, re from m5.SimObject import isRoot, isSimObjectVector +from m5.params import PortRef from m5.util import warn try: import pydot @@ -106,7 +107,7 @@ def dot_create_edges(simNode, callgraph): full_port_name = full_path + "_" + port_name port_node = dot_create_node(simNode, full_port_name, port_name) # create edges - if type(port) is m5.params.PortRef: + if isinstance(port, PortRef): dot_add_edge(simNode, callgraph, full_port_name, port) else: for p in port.elements: |