diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-02-21 12:26:29 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-02-21 12:26:29 +0100 |
commit | 37c3c6ec5382052743a99d881298255b7b7ccc50 (patch) | |
tree | a0394d9e84f993ef625cd1fb2431a2a33103e8f7 /bin | |
parent | 32213cdb49a08bd0f2012baaefb031d0726dc4bf (diff) |
add dtree graphviz/dot export via --export-dot / to_dot()
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-archive.py | 7 | ||||
-rwxr-xr-x | bin/analyze-kconfig.py | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index 7fb5719..e9e5171 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -465,7 +465,7 @@ if __name__ == "__main__": help="Load DFA hardware model from JSON or YAML FILE", ) parser.add_argument( - "--export-dot", + "--export-pta-dot", metavar="FILE", type=str, help="Export PTA representation suitable for Graphviz dot to FILE", @@ -1067,12 +1067,15 @@ if __name__ == "__main__": json.dump(json_model, f, indent=2, sort_keys=True, cls=NpEncoder) if args.export_dot: + dfatool.cli.export_dot(model, args.export_dot) + + if args.export_pta_dot: if not pta: print( "Note: v0 measurements do not embed the PTA used for benchmark generation. Estimating PTA from recorded observations." ) json_model = model.to_json() - with open(args.export_dot, "w") as f: + with open(args.export_pta_dot, "w") as f: f.write(model.to_dot()) sys.exit(0) diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index db6cf40..565203b 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -319,6 +319,9 @@ def main(): else: static_quality = model.assess(static_model) + if args.export_dot: + dfatool.cli.export_dot(model, args.export_dot) + if args.export_dref: dref.update( model.to_dref( |