Expand description
Exporting the currently displayed variables to an FST waveform file.
Only the displayed variables (and only the hierarchy needed to reach them, not the full design hierarchy) are written out.
Structsยง
- FstExport
Data ๐ - A self-contained snapshot of everything needed to write a set of variables (and only the hierarchy needed to reach them) to an FST file.
- FstExport
Node ๐ - A single node of the minimal scope tree needed to export a set of variables to FST.
Enumsยง
- FstExport ๐
- Backend-agnostic, owned snapshot of the data needed to write signals out to an FST file.
Functionsยง
- common_
power_ ๐of_ ten - Finds the largest power of ten that evenly divides every non-zero time stamp
tintimes. This tells us how much coarser than the sourceโs declared timescale the exportโs timescale exponent can be (i.e. closer to zero) while still representing every required time stamp as an exact integer. - fst_
scope_ ๐type - Maps a wellen scope type to its FST equivalent.
- fst_
var_ ๐direction - Maps a wellen variable direction to its FST equivalent.
- fst_
var_ ๐type - Maps a wellen variable type to its FST equivalent.
- scale_
time ๐ - Rescales a raw time stamp from the sourceโs timescale to the exportโs timescale,
given the precomputed divisor
10.pow(time_scale_shift)(seecommon_power_of_ten). - trailing_
zeros_ ๐base10 - Counts how many trailing (decimal) zeros
nhas, i.e. the largestkfor which10^kdividesnevenly.nmust be non-zero: 0 is a multiple of every power of ten, which would loop forever. Callers filter out zero time stamps beforehand. - write_
fst_ ๐export_ node - Recursively declares
nodeโs scopes and variables in the FST header. - write_
fst_ ๐export_ var - Declares a single variable in the FST header, reusing an existing signal id if the same signal was already declared under a different variable name (aliasing).