mithro / valentyusb

USB Full-Speed core written in migen/LiteX
BSD 3-Clause "New" or "Revised" License
17 stars 3 forks source link

Generate gtkwave files for the vcd files #19

Open mithro opened 5 years ago

mithro commented 5 years ago

It would be good to generate gtkwave files for the vcd which do the following,

ewenmcneill commented 5 years ago

Capturing context from IRC before I context-switch to something else.

I've got a tiny start on this in https://github.com/ewenmcneill/valentyusb/tree/usb12-gtkwave (mostly a reimplementation of run_simulation() which lets us then inspect the Simulator to pull things out.

https://pypi.org/project/pyvcd/ and particularly https://pyvcd.readthedocs.io/en/latest/vcd.gtkw.html look interesting. The latter seems to help create *.gtkw save files for GtkWave that load the VCD file, but we need to give it a vcd dump file and a list of signals to include, etc. Hence start of attempt at extracting the signals we need. (If that doesn't work enough, possibly we parse the VCD file back off disk with https://pypi.org/project/Verilog_VCD -- https://pypi.org/project/Verilog_VCD AFAICT -- and work from there.)

Ewen

GitHub
ewenmcneill/valentyusb
USB Full-Speed core written in migen/LiteX. Contribute to ewenmcneill/valentyusb development by creating an account on GitHub.
PyPI
pyvcd
Python VCD file support.
vcd.gtkw — pyvcd documentation
PyPI
Verilog_VCD
Module to Parse VCD (Value-Change-Dump) files