nickg / nvc

VHDL compiler and simulator
https://www.nickg.me.uk/nvc/
GNU General Public License v3.0
589 stars 75 forks source link

Boolean typed signals written as 1 bit vectors on the FST output #897

Closed augustofg closed 2 weeks ago

augustofg commented 2 weeks ago

I've been experimenting with Surfer and it didn't like the way NVC represents boolean signals on FST files. Here is the issue I've opened on wellen (the waveform file parser used in Surfer). The author implemented a workaround to avoid crashing wellen, but it may be better to use the same strategy that GHDL uses (enum type).

ekiwi commented 2 weeks ago

Turns out this is more of a wellen bug.

I still think that using the enum table encoding in FST would be neater (and more space efficient). But emitting enums as Strings is totally fine and should be supported by all viewers.

@augustofg you can probably close this issue.

nickg commented 2 weeks ago

I tried this in the commit above and it works with Surfer and the master branch of GtkWave, but GtkWave v3.3.114 (the current release in Debian) crashes with:

FSTLOAD | Internal error, nonsequential enum tables definition encountered, exiting.

So I've left it disabled for now.