diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-archive.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index 6f5fc37..8b58478 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -615,6 +615,12 @@ if __name__ == "__main__": help="Load DFA hardware model from JSON or YAML FILE", ) parser.add_argument( + "--export-dot", + metavar="FILE", + type=str, + help="Export PTA representation suitable for Graphviz dot to FILE", + ) + parser.add_argument( "--export-energymodel", metavar="FILE", type=str, @@ -1222,4 +1228,13 @@ if __name__ == "__main__": with open(args.export_energymodel, "w") as f: json.dump(json_model, f, indent=2, sort_keys=True, cls=NpEncoder) + if args.export_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: + f.write(model.to_dot()) + sys.exit(0) |