help="Create JSON output of the configuration [Default: %default]")
option("--dot-config", metavar="FILE", default="config.dot",
help="Create DOT & pdf outputs of the configuration [Default: %default]")
- option("--dot-dvfs-config", metavar="FILE", default="config_dvfs.dot",
+ option("--dot-dvfs-config", metavar="FILE", default=None,
help="Create DOT & pdf outputs of the DVFS configuration" + \
" [Default: %default]")
# We want to generate the DVFS diagram for the system. This can only be
# done once all of the CPP objects have been created and initialised so
# that we are able to figure out which object belongs to which domain.
- do_dvfs_dot(root, options.outdir, options.dot_dvfs_config)
+ if options.dot_dvfs_config:
+ do_dvfs_dot(root, options.outdir, options.dot_dvfs_config)
# We're done registering statistics. Enable the stats package now.
stats.enable()
except AttributeError:
# Just re-use the domain from above
c_dom = domain
- c_dom.__getattr__('voltage_domain')
+ v_dom = c_dom.__getattr__('voltage_domain')
pass
if c_dom == domain or c_dom == None:
except AttributeError:
# Just re-use the domain from above
c_dom = domain
- c_dom.__getattr__('voltage_domain')
+ v_dom = c_dom.__getattr__('voltage_domain')
pass
if c_dom == domain or c_dom == None:
def do_dvfs_dot(root, outdir, dotFilename):
if not pydot:
return
- dvfsgraph = pydot.Dot(graph_type='digraph', ranksep='1.3')
- dot_create_dvfs_nodes(root, dvfsgraph)
- dot_create_edges(root, dvfsgraph)
- dot_filename = os.path.join(outdir, dotFilename)
- dvfsgraph.write(dot_filename)
+
+ # There is a chance that we are unable to resolve the clock or
+ # voltage domains. If so, we fail silently.
+ try:
+ dvfsgraph = pydot.Dot(graph_type='digraph', ranksep='1.3')
+ dot_create_dvfs_nodes(root, dvfsgraph)
+ dot_create_edges(root, dvfsgraph)
+ dot_filename = os.path.join(outdir, dotFilename)
+ dvfsgraph.write(dot_filename)
+ except:
+ warn("Failed to generate dot graph for DVFS domains")
+ return
+
try:
# dot crashes if the figure is extremely wide.
# So avoid terminating simulation unnecessarily