Discussion:
[Ghdl-discuss] GHDL VPI/VHPI waveform tracing
Mark Hampton
2016-11-29 17:24:03 UTC
Permalink
I’d like to investigate storing waveform traces in a new format. Does someone know of a VPI/VHPI extension for ghdl that does signal tracing ? Any pointers to existing code that might be useful would be greatly appreciated.

I’d like to use the VPI or VHPI rather than modify ghdl’s code.

Thanks!
Adam Jensen
2016-11-29 18:30:03 UTC
Permalink
Post by Mark Hampton
I’d like to investigate storing waveform traces in a new format. Does someone know of a VPI/VHPI extension for ghdl that does signal tracing ? Any pointers to existing code that might be useful would be greatly appreciated.
I’d like to use the VPI or VHPI rather than modify ghdl’s code.
To get started, perhaps something like a signal logging function could
be written by following the examples in [1,2].

[1]:
http://ghdl.readthedocs.io/en/latest/GHDL_implementation_of_VHDL.html#interfacing-to-other-languages

[2]: http://ygdes.com/GHDL/

If the new trace formats are to support complex VHDL types, marshaling
the data structures through the interface in such a way that information
isn't lost might get interesting.

What kind of file format do you have in mind?
Tristan Gingold
2016-11-29 19:18:26 UTC
Permalink
Post by Mark Hampton
I’d like to investigate storing waveform traces in a new format. Does someone know of a VPI/VHPI extension for ghdl that does signal tracing ? Any pointers to existing code that might be useful would be greatly appreciated.
The first implementation of VPI in GHDL was done for that purpose by
Felix Bertram. Old software at https://sourceforge.net/p/ivi/wiki/Home/
Post by Mark Hampton
I’d like to use the VPI or VHPI rather than modify ghdl’s code.
Not sure this is the most efficient way however.

Regards,
Tristan.
Mark Hampton
2016-11-30 12:35:08 UTC
Permalink
Thanks for the pointers.

The examples are great but I did not see a callback being used. I couldn’t see callbacks for the VHPI in the ghdl source either but they are there for the vpi. Are there examples of the vpi with callbacks being used ?

I was planning on staying away from the complex data types for now but it is worthwhile thinking about how difficult that may become, thanks.

For the format I’m interested in having something that is binary, compact and open. FSDB would be fine if it was open. The formats I’ve seen are LXT, LXT2, VZT, FST, GHW, VCD, EVCD It would be nice to have one format that works across all simulators.
Adam Jensen
2016-11-30 18:20:36 UTC
Permalink
Post by Mark Hampton
For the format I’m interested in having something that is binary, compact and open. FSDB would be fine if it was open. The formats I’ve seen are LXT, LXT2, VZT, FST, GHW, VCD, EVCD It would be nice to have one format that works across all simulators.
I've speculated occasionally on this mailing list that HDF5[1] might be
useful as a signal trace file format, but I haven't gotten around to
putting together an evaluation framework.

[1]: https://en.wikipedia.org/wiki/Hierarchical_Data_Format


A [Python interface][2] makes it easy to tinker with the technology.

[2]: http://www.h5py.org/
Tristan Gingold
2016-11-30 19:23:34 UTC
Permalink
Post by Mark Hampton
Thanks for the pointers.
The examples are great but I did not see a callback being used. I couldn’t see callbacks for the VHPI in the ghdl source either but they are there for the vpi. Are there examples of the vpi with callbacks being used ?
Only vpi supports callback (in ghdl). In fact there is almost no user
support for vhpi.
Post by Mark Hampton
I was planning on staying away from the complex data types for now but it is worthwhile thinking about how difficult that may become, thanks.
For the format I’m interested in having something that is binary, compact and open. FSDB would be fine if it was open. The formats I’ve seen are LXT, LXT2, VZT, FST, GHW, VCD, EVCD It would be nice to have one format that works across all simulators.
FST is supported by many open source tools, including ghdl.

Tristan.

Loading...