pyvcd is a Python library designed for working with Value Change Dump (VCD) files. It provides functionalities for both reading and writing these standard files used to record signal activity in digital logic simulations. The current version is 0.4.1, and releases are generally made on an as-needed basis for bug fixes or minor enhancements.
pip install pyvcdVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to create a VCD file, define a module scope, declare signals (wires), and record their value changes over time using `VCDWriter`.
Always use `VCDWriter` as a context manager: `with VCDWriter(open('file.vcd', 'w'), ...) as writer:`Ensure `timescale` (e.g., '1 ns', '1 ps', '1 us') accurately reflects the time units used for your simulation data.
Ensure values passed to `writer.change()` for `wire` types are integers. For bit-string representations, consider converting to integer or ensuring your VCD viewer handles them correctly.
No dependency data recorded yet.