summaryrefslogtreecommitdiff
path: root/src/python/m5/SimObject.py
diff options
context:
space:
mode:
authorUri Wiener <uri.wiener@arm.com>2012-05-10 18:04:27 -0500
committerUri Wiener <uri.wiener@arm.com>2012-05-10 18:04:27 -0500
commit29a5e6ff35a10c4351cb857ce2be0031791e5d5d (patch)
tree4c264d4cb1714e5069c6faa42ad7c71676e70e8a /src/python/m5/SimObject.py
parentcb1b63ea61c597e680adf80540ad65abeceb76a8 (diff)
downloadgem5-29a5e6ff35a10c4351cb857ce2be0031791e5d5d.tar.xz
DOT: improved dot-based system visualization
Revised system visualization to reflect structure and memory hierarchy. Improved visualization: less congested and cluttered; more colorful. Nodes reflect components; directed edges reflect dirctional relation, from a master port to a slave port. Requires pydot.
Diffstat (limited to 'src/python/m5/SimObject.py')
-rw-r--r--src/python/m5/SimObject.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py
index 04b4af69d..05cb3bb54 100644
--- a/src/python/m5/SimObject.py
+++ b/src/python/m5/SimObject.py
@@ -44,11 +44,6 @@
import sys
from types import FunctionType, MethodType, ModuleType
-try:
- import pydot
-except:
- pydot = False
-
import m5
from m5.util import *
@@ -1060,44 +1055,6 @@ class SimObject(object):
def takeOverFrom(self, old_cpu):
self._ccObject.takeOverFrom(old_cpu._ccObject)
- # generate output file for 'dot' to display as a pretty graph.
- def outputDot(self, dot):
- if isRoot(self):
- label = "{root|"
- else:
- label = "{%s|" % self._name
-
- if isSimObject(self._base):
- label += '%s|' % self.type
-
- if self._children:
- for c in self._children:
- child = self._children[c]
- if isSimObjectVector(child):
- for obj in child:
- dot.add_edge(pydot.Edge(self.path(), obj.path(), style="bold"))
- else:
- dot.add_edge(pydot.Edge(self.path(), child.path(), style="bold"))
-
- for param in self._params.keys():
- value = self._values.get(param)
- if value != None:
- ini_str_value = self._values[param].ini_str()
- label += '%s = %s\\n' % (param, re.sub(':', '-', ini_str_value))
-
- label += '}'
-
- dot.add_node(pydot.Node(self.path(), shape="Mrecord",label=label))
-
- # recursively dump out children
- for c in self._children:
- child = self._children[c]
- if isSimObjectVector(child):
- for obj in child:
- obj.outputDot(dot)
- else:
- child.outputDot(dot)
-
# Function to provide to C++ so it can look up instances based on paths
def resolveSimObject(name):
obj = instanceDict[name]