vunit icon indicating copy to clipboard operation
vunit copied to clipboard

Issue 455

Open GlenNicholls opened this issue 5 years ago • 3 comments

Identical to https://github.com/VUnit/vunit/pull/665 as I needed to fork for other development.

added add_waves_by_depth method and TCL scripts for modelsim, aldec, and ghdl

This is in primarily in relation to #455, but aligns with my comments in #615 . I avoided the #622 PR because it is pretty far behind master and @nfrancque appeared to mostly have stuff for the ModelSim save/load of wave files which is different than what I'm looking to add. I have some outstanding questions:

  • Does it make sense to add waves as I have done with add_waves_by_depth() which calls set_sim_option() under the covers?
  • do I need a unit test for add_waves_by_depth()? If so, how would I do this since the entire interface is creating a file and adding waves to the simulator?

This PR would close out #455, but the below feature requests are my vision for #615:

  • JSON interface such that user can add hierarchy path to signals/variables/constants and some options and VUnit would take care of simulator specific TCL commands
  • Add bools to add_waves_by_depth() so user can include constants and/or variables as well.
  • Add command-line option to add by depth in cases where adding add_waves_by_depth to run.py doesn't always make sense
  • Add simulator GUI option for adding waves by depth (gated by #622 being accepted and merged with master)

GlenNicholls avatar Oct 31 '20 17:10 GlenNicholls

do I need a unit test for add_waves_by_depth()? If so, how would I do this since the entire interface is creating a file and adding waves to the simulator?

I'm not sure about how to test this in CI, but it would be helpful to add some example, or to add this feature to an existing example. That would allow to easily test it locally.

JSON interface such that user can add hierarchy path to signals/variables/constants and some options and VUnit would take care of simulator specific TCL commands

Are you aware of https://ghdl.github.io/ghdl/using/Simulation.html#cmdoption-ghdl-read-wave-opt? It's not JSON and it's not exactly the same feature. But I guess it might some optional feature for GHDL. Furthermore, it might be feasible to enhance GHDL so that the JSON format is accepted too.

eine avatar Nov 11 '20 01:11 eine

Are you aware of https://ghdl.github.io/ghdl/using/Simulation.html#cmdoption-ghdl-read-wave-opt? It's not JSON and it's not exactly the same feature. But I guess it might some optional feature for GHDL. Furthermore, it might be feasible to enhance GHDL so that the JSON format is accepted too.

I was not aware of that, but it seems useful to simplify the TCL script provided for GHDL. I'll look into it to see if it would be helpful!

GlenNicholls avatar Nov 11 '20 15:11 GlenNicholls

One thing I love about VUnit + Gtkwave is that I can simulate, open the waveform, layout my signals how I like, and then make changes to the hdl as required, resimulate, then all I have to do is hit CTRL+SHIFT+R in gtkwave and the waveform updates. It is so much faster than the way I used to do things. The current sim time cursor doesn't even move either, so you can change logic, rerun vunit test, hit CTRL+SHIFT+R, and see the signals adjust in real time. Somewhat related feature request: provide the feature mentioned above with the Vunit -g switch

a-panella avatar Nov 26 '20 03:11 a-panella