Skip to main content

Module fst_export

Module fst_export 

Source
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ยง

FstExportData ๐Ÿ”’
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.
FstExportNode ๐Ÿ”’
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 t in times. 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) (see common_power_of_ten).
trailing_zeros_base10 ๐Ÿ”’
Counts how many trailing (decimal) zeros n has, i.e. the largest k for which 10^k divides n evenly. n must 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).