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.
This commit is contained in:
Uri Wiener
2012-05-10 18:04:27 -05:00
parent cb1b63ea61
commit 29a5e6ff35
4 changed files with 195 additions and 63 deletions

View File

@@ -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):