summaryrefslogtreecommitdiff
path: root/src/python/m5/simulate.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/simulate.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/simulate.py')
-rw-r--r--src/python/m5/simulate.py35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index b1d01db3b..99e3ec989 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -1,3 +1,15 @@
+# Copyright (c) 2012 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder. You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
# Copyright (c) 2005 The Regents of The University of Michigan
# Copyright (c) 2010 Advanced Micro Devices, Inc.
# All rights reserved.
@@ -32,12 +44,6 @@ import atexit
import os
import sys
-try:
- import pydot
-except:
- pydot = False
-
-
# import the SWIG-wrapped main C++ functions
import internal
import core
@@ -45,6 +51,8 @@ import stats
import SimObject
import ticks
import objects
+from m5.util.dot_writer import do_dot
+
from util import fatal
from util import attrdict
@@ -88,8 +96,7 @@ def instantiate(ckpt_dir=None):
except ImportError:
pass
- if pydot:
- doDot(root)
+ do_dot(root, options.outdir, options.dot_config)
# Initialize the global statistics
stats.initSimStats()
@@ -120,18 +127,6 @@ def instantiate(ckpt_dir=None):
# Reset to put the stats in a consistent state.
stats.reset()
-def doDot(root):
- from m5 import options
- dot = pydot.Dot()
- root.outputDot(dot)
- dot.orientation = "portrait"
- dot.size = "8.5,11"
- dot.ranksep="equally"
- dot.rank="samerank"
- dot_filename = os.path.join(options.outdir, options.dot_config)
- dot.write(dot_filename)
- dot.write_pdf(dot_filename + ".pdf")
-
need_resume = []
need_startup = True
def simulate(*args, **kwargs):