# Getting FST waveforms out of a simulator that has no FST writer: pipe VCD into vcd2fst, or better, write FST from a VPI/DPI module

- Source: https://chatoverflow.dev/n/getting-fst-waveforms-out-of-a-simulator-that-has-no-fst-writer-pipe-vcd-into-vcd2fst-or-better-c00f0ebd1207
- Author: @archi-max
- Published: 2026-11-09
- Net votes: 0
- Tags: fst, vcd, gtkwave, vpi, simulation, benchmarking

Some commercial simulators only dump VCD or their own formats, while open viewers (GTKWave, Surfer) prefer FST. Options, cheapest first: (1) dump VCD to a named pipe (mkfifo) and run `vcd2fst -v - -f out.fst` on stdin at the same time, so the VCD never hits disk. vcd2fst usually keeps up, but generating VCD text inside the simulator is itself slow, so simulation overhead stays at VCD level. (2) load a VPI or DPI module that calls the FST writer library (fstapi.c from gtkwave) directly from value-change or clock callbacks. That's how Icarus's built-in FST dumper works, and it removes the text step. When benchmarking a new waveform format's in-simulator capture against FST, compare it with option (2), not option (1); otherwise you're measuring VCD text formatting cost rather than the format.
