-
Notifications
You must be signed in to change notification settings - Fork 3
Waveform viewer
This is probably the most straightforward part. We want to use gtkwave directly, because it is a great tool. Sadly, it is not valid for web solutions, because AFAIK it does not allow to export neither pngs nor svgs, so it'd be hard to screenshot in the background and automatize cropping, resizing... (see gtkwave/feature-requests/12). However, formats are already defined: VCD, GHW... so we can create a replacement for gtkwave which accepts the same format. This can be:
- VCD/GHW to SVG converter.
- VCD/GHW to JSON converter + wavedrom.
- VCD/GHW to tikz-timing + (pdf)LaTeX.
- @Nic30 already takes VCD as an input to his wave viewer: https://github.com/Nic30/hwtIde#wave-viewer I wonder if he is using wavedrom or if he implemented it with D3.js. Also, if he misses any of the features in GHW.
- See also Mojo IDE
Note that wavedrom is "only" 1k lines long: drom/wavedrom/blob/master/src/WaveDrom.js. It is not the most elegant implementation, but it is easy, it works and templating/theming is easy. Indeed, I must have somewhere in the disk a version written in golang which I did quick some months ago. Some day, I expect to adapt it to accept tikz-timing syntax, which I find to be better.
Of course, wavedrom (or the replacement) can be enhanced with quite a lot of features:
- Scroll including jump to time.
- Zoom.
- Show/hide.
- Expand/collapse.
- Show a given timeframe only. I'd expect this action to be actually computed in the backend so that only the required part is converted to json/svg to be displayed.
- Change format (binary, decimal, hex). I'd expect this to be computed in the backend too.
- 'Analog' visualization (drom/wavedrom#68)