dot_writer.py (11418:0aeca8f47eac) | dot_writer.py (11431:871eaaa0ab24) |
---|---|
1# Copyright (c) 2012-2013 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 296 unchanged lines hidden (view full) --- 305 if isSimObjectVector(child): 306 for obj in child: 307 try: 308 c_dom = obj.__getattr__('clk_domain') 309 v_dom = c_dom.__getattr__('voltage_domain') 310 except AttributeError: 311 # Just re-use the domain from above 312 c_dom = domain | 1# Copyright (c) 2012-2013 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 296 unchanged lines hidden (view full) --- 305 if isSimObjectVector(child): 306 for obj in child: 307 try: 308 c_dom = obj.__getattr__('clk_domain') 309 v_dom = c_dom.__getattr__('voltage_domain') 310 except AttributeError: 311 # Just re-use the domain from above 312 c_dom = domain |
313 c_dom.__getattr__('voltage_domain') | 313 v_dom = c_dom.__getattr__('voltage_domain') |
314 pass 315 316 if c_dom == domain or c_dom == None: 317 dot_create_dvfs_nodes(obj, cluster, domain) 318 else: 319 if c_dom not in dvfs_domains: 320 dvfs_cluster = dot_add_clk_domain(c_dom, v_dom) 321 dvfs_domains[c_dom] = dvfs_cluster 322 else: 323 dvfs_cluster = dvfs_domains[c_dom] 324 dot_create_dvfs_nodes(obj, dvfs_cluster, c_dom) 325 else: 326 try: 327 c_dom = child.__getattr__('clk_domain') 328 v_dom = c_dom.__getattr__('voltage_domain') 329 except AttributeError: 330 # Just re-use the domain from above 331 c_dom = domain | 314 pass 315 316 if c_dom == domain or c_dom == None: 317 dot_create_dvfs_nodes(obj, cluster, domain) 318 else: 319 if c_dom not in dvfs_domains: 320 dvfs_cluster = dot_add_clk_domain(c_dom, v_dom) 321 dvfs_domains[c_dom] = dvfs_cluster 322 else: 323 dvfs_cluster = dvfs_domains[c_dom] 324 dot_create_dvfs_nodes(obj, dvfs_cluster, c_dom) 325 else: 326 try: 327 c_dom = child.__getattr__('clk_domain') 328 v_dom = c_dom.__getattr__('voltage_domain') 329 except AttributeError: 330 # Just re-use the domain from above 331 c_dom = domain |
332 c_dom.__getattr__('voltage_domain') | 332 v_dom = c_dom.__getattr__('voltage_domain') |
333 pass 334 335 if c_dom == domain or c_dom == None: 336 dot_create_dvfs_nodes(child, cluster, domain) 337 else: 338 if c_dom not in dvfs_domains: 339 dvfs_cluster = dot_add_clk_domain(c_dom, v_dom) 340 dvfs_domains[c_dom] = dvfs_cluster --- 24 unchanged lines hidden (view full) --- 365 callgraph.write_svg(dot_filename + ".svg") 366 callgraph.write_pdf(dot_filename + ".pdf") 367 except: 368 warn("failed to generate dot output from %s", dot_filename) 369 370def do_dvfs_dot(root, outdir, dotFilename): 371 if not pydot: 372 return | 333 pass 334 335 if c_dom == domain or c_dom == None: 336 dot_create_dvfs_nodes(child, cluster, domain) 337 else: 338 if c_dom not in dvfs_domains: 339 dvfs_cluster = dot_add_clk_domain(c_dom, v_dom) 340 dvfs_domains[c_dom] = dvfs_cluster --- 24 unchanged lines hidden (view full) --- 365 callgraph.write_svg(dot_filename + ".svg") 366 callgraph.write_pdf(dot_filename + ".pdf") 367 except: 368 warn("failed to generate dot output from %s", dot_filename) 369 370def do_dvfs_dot(root, outdir, dotFilename): 371 if not pydot: 372 return |
373 dvfsgraph = pydot.Dot(graph_type='digraph', ranksep='1.3') 374 dot_create_dvfs_nodes(root, dvfsgraph) 375 dot_create_edges(root, dvfsgraph) 376 dot_filename = os.path.join(outdir, dotFilename) 377 dvfsgraph.write(dot_filename) | 373 374 # There is a chance that we are unable to resolve the clock or 375 # voltage domains. If so, we fail silently. |
378 try: | 376 try: |
377 dvfsgraph = pydot.Dot(graph_type='digraph', ranksep='1.3') 378 dot_create_dvfs_nodes(root, dvfsgraph) 379 dot_create_edges(root, dvfsgraph) 380 dot_filename = os.path.join(outdir, dotFilename) 381 dvfsgraph.write(dot_filename) 382 except: 383 warn("Failed to generate dot graph for DVFS domains") 384 return 385 386 try: |
|
379 # dot crashes if the figure is extremely wide. 380 # So avoid terminating simulation unnecessarily 381 dvfsgraph.write_svg(dot_filename + ".svg") 382 dvfsgraph.write_pdf(dot_filename + ".pdf") 383 except: 384 warn("failed to generate dot output from %s", dot_filename) | 387 # dot crashes if the figure is extremely wide. 388 # So avoid terminating simulation unnecessarily 389 dvfsgraph.write_svg(dot_filename + ".svg") 390 dvfsgraph.write_pdf(dot_filename + ".pdf") 391 except: 392 warn("failed to generate dot output from %s", dot_filename) |