This is super small post about generating a block diagram from verilog design.
yosys -s vis.ys
read_verilog *.v
prep -top top
write_json top.elaborated.json
write_verilog top.elaborated.v
show -format png -prefix top
To generate SVG then PNG from json, we can use netlistsvg
to process the generated yosys json.
npm install -g netlistsvg
netlistsvg elaborated.json -o elaborated.svg
convert elaborated.svg elaborated.png
There first diagram is the one generated by yosys.
The second which looks cleaner with less details, is generated by netlistsvg