Skip to main content

Module vcd

Module vcd 

Source
Expand description

VCD (value change dump) files from HDL simulators and logic analyzers, read into a long table: one row per value change of each signal.

A VCD file is whitespace-separated tokens: a header of $keyword ... $end sections ($timescale, $scope, $var), then #time markers and value changes. The reader takes the file a piece at a time and keeps only the token being read, the header and one batch of rows. Every length is bounded: a token, a header text, the scope depth and the number of signals.

Structs§

Header
The file’s header.
Stats
What reading noticed.
Var
One declared signal.
VcdReader
Reads a VCD file a piece at a time.

Enums§

Scale
What the file’s $timescale makes of a #time.

Constants§

BATCH_ROWS
Rows held before a batch is handed over.
BATCH_TEXT
Text held before a batch is handed over, whatever its rows.
MAX_DEPTH
The deepest scope nesting.
MAX_EXTEND
The widest vector a short value is extended to: VCD leaves leading zeros out.
MAX_PATHS
The most bytes of signal paths held, all signals together.
MAX_TEXT
The most text kept of one header section ($date, $version, $comment).
MAX_TOKEN
The longest token read; a longer one is passed over.

Functions§

detail
The VCD tab of the Info panel: the header and the signals.
looks_like
Whether the first bytes are a VCD header: a $ section that VCD writers start with, closed by $end.
parse_timescale
1 ns, 10ps, 100 fs: the timescale’s text as a Scale.