TerosTechnology / vscode-terosHDL

VHDL and Verilog/SV IDE: state machine viewer, linter, documentation, snippets... and more!
https://terostechnology.github.io/terosHDLdoc/
524 stars 42 forks source link

Export state machine diagram to structured text #395

Open svenn71 opened 1 year ago

svenn71 commented 1 year ago

Sometimes I would like to open the resulting state diagram in a separate program to experiment with the presentation. Currently the only option is "Save as SVG". A JSON or YAML file would be fine, then further processing can be done in an external utility to adjust to target application as there are several graph description languages available.

qarlosalberto commented 1 year ago

What could be the format?

svenn71 commented 1 year ago

My initial thought was to play around with the state machine diagram in yEd since yEd give me the possibility to play around with layout of the graph. yEd supports the following file formats https://yed.yworks.com/support/manual/fileformat.html

I think the simple GML ASCII format looks best as a starting point, because it supports a few other tools than yEd and also graphviz (through a converter) according to the linked Wikipedia page.

With GML there is also support for python module NetworkX which I see used in Jupyter from time to time.