Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Add support for FST output #101

Open
ekiwi opened this issue May 20, 2019 · 5 comments
Open

Add support for FST output #101

ekiwi opened this issue May 20, 2019 · 5 comments

Comments

@ekiwi
Copy link
Collaborator

ekiwi commented May 20, 2019

The fst file format is supported by GTKwave and has the following nice properties:

  • it's compressed, so the files are much smaller than VCD files
  • it supports SV records and enums, so there is potential to use some high level info from Chisel in order to make the output nicer

The biggest downside is the terrible documentation. The best material I have found so far is the paper at the end of the GTKwave manual titled Implementation of an Efficient Method for Digital Waveform Compression. Also the source code from icarus verilog is fairly readable: sys_fst.c, fstapi.h and fstapi.c.

@chick
Copy link
Collaborator

chick commented May 21, 2019

Do you have fst files that you would like to be able to process? I looked through the appendix and it seem comprehensible, but a bit elaborate with the database and compression etc. Treadle's basic speed is not that fast so typically any vcd data one is working with is usually not so big as to be prohibitive to process. If I was making more progress on the chisel GUI it might be important because passing wave data from treadle to a rendering agent could be a problem, but there it would probably be better to have a different organization. I'd be happy to talk to you more about this if you'd like

@ekiwi
Copy link
Collaborator Author

ekiwi commented May 21, 2019

I'd be happy to talk to you more about this if you'd like

Sounds good. I mostly want to have a more expressive waveform view.

Let's consider this a tracking issue for now. If I have time after the retreat, I could try to implement a fst writer in Scala.

@chick
Copy link
Collaborator

chick commented May 21, 2019

Sounds good to me.

@Timmmm
Copy link

Timmmm commented Feb 15, 2024

I wrote a specification for FST here. I also wrote some incomplete code to read it here and the Surfer project also supports reading FST (code here). Their code looks way better than mine tbh.

Should give a good idea how to write FST files.

@ekiwi
Copy link
Collaborator Author

ekiwi commented Feb 15, 2024

I wrote a specification for FST here.

Thanks for writing that spec Tim! I actually had a look at it when I was implementing the FST reader for Surfer. (The reader is published as a stand alone library btw: https://crates.io/crates/fst-native).

Unfortunately I never quite finished making a FST writer. The hard part is imho how to efficiently store the change data as it comes from the simulator before reformatting it to write it to disk. As I like to say: VCD is easy to write, hard to read (efficiently). FST is easy to read, but hard to write (efficiently).

Alas, unfortunately treadle has been mostly abandoned. I keep a version of it alive as part of my chiseltest library, but unfortunately I won't have time to add new features.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants