Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the 'apio graph' command which generates a svg graph of the verilog code. #356

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

zapta
Copy link
Contributor

@zapta zapta commented Feb 26, 2024

Added a new 'apio graph' command which uses yosys to generate, a hardware.svg file with a visual representation of a verilog module. By default it shows the top module and this can be changed with the --top-module flag.

This is the yosys command that generates the graph
https://yosyshq.readthedocs.io/projects/yosys/en/manual-rewrite/cmd/show.html

Caveats

  1. The command requires the graphviz dot command to be in the path. Ideally this can auto installed in future versions of apio.

  2. The command generates the hardware.svg file but doesn't launch automatically a viewer (any web browser would do). Need to find a cross platform way to do that.

  3. The graphs are not perfect, but hopefully will be improved over time. For example per this feature request Please add a flag to generate a simplified graphviz diagram. YosysHQ/yosys#4236 or with additions of post optimization graphs.

…e.svg file with

a  visual representation of the verilog code. The graphs are not perfect but useful
and educating. Can be improve down the road by auto launching a graphical viewer or by
encouraning the yosys team to improve the graphs.  E.g. YosysHQ/yosys#4236,
or having also a graph of the design after optimization to help with timing improvements.
@Obijuan Obijuan merged commit 3d645e6 into FPGAwars:develop Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants