SetVCD
Programmatically inspect hardware VCD signals using a high-level functional interface.
Higher-order programming constructs and set operations are a natural fit for inspecting VCD signals, and this Python library allows you to easily specify, in text, what simulation timesteps matter to functional correctness.
Motivating Example
Say you are debugging a streaming input interface (Accelerator.io_input) and you would like to extract only the values when the streaming transaction is valid. Typically when viewing a wavefile in a viewer, the points we care about look like this:
We can write this desired condition, parameterised by simulation timestep t as a formal statement:
(clk(t - 1) == 0 and clk(t) == 1) and
reset(t) == 0 and
input_ready(t) == 1 and
input_valid(t) == 1
This is a very natural fit for higher-order functions and set operations.
This library provides you two important methods:
-
Get set of timesteps with condition:
SetVCD.get(signal_name: String, condition: (ValueType, ValueType, ValueType) -> Bool, value_type: Raw or String or FP) -> SignalExpression
- SignalExpression represents subset of timesteps of the wavefile that meet the provided condition.
- Two SignalExpression objects (
aandb) be combined with set operations to create a higher SignalExpressionc = a & b: c is the intersection of set a and b.c = a | b: c is the union of set a and b.c = a ^ b: c is the difference of set a and b.
-
A SignalExpression object obtained from
getand combined with operations can then be evaluated on the wavefile via:SetVCD.get_value(signal_name: str, expr: SignalExpression, value_type: Raw or String or FP) -> List(Value) SetVCD.get_value_with_t(signal_name: str, expr: SignalExpression, value_type: Raw or String or FP) -> List((Timestep, Value))
- This yields the set of values you would be interested in.
For a practical example, please see our pre-filled notebook: example.ipynb
Overview
SetVCD is a Python package for analyzing Verilog VCD files and extracting time points where specific signal conditions are met. It provides a simple, type-safe interface for working with simulation waveforms using set-based operations.
Installation
The package is available in PyPI:
pip install setVCD
Future Enhancements
Planned for future versions:
- Higher-order operations for signal conditions
- Performance optimization for large VCD files
- Streaming interface for very large files
- MCP (Model Context Protocol) integration
Metadata
Release files for setVCD 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| setvcd-0.8.0.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| setvcd-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.4 kB
Release files / setvcd-0.8.0.tar.gz
| Download URL | setvcd-0.8.0.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bac9884557c0fda5d3d501a4f86a598f61cc31180feda884e48eab23c736786
|
|
BLAKE2b-256 checksum How to use checksums |
084528886e8f812462f1705c89ae7ea70705b3c75df030f4d3d513855870f7b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 17, 2026.
Transparency logRelease files / setvcd-0.8.0-py3-none-any.whl
| Download URL | setvcd-0.8.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a72f976aa406d60819b92709634162676d5efd3fdaea071cbe37d21af4df3e1
|
|
BLAKE2b-256 checksum How to use checksums |
8089f4919c43924eca345ec0ba708b2e1d8e9ac4da7a3bb720c5412b9eb414e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 17, 2026.
Transparency log