Skip to main content

vcd_tools_rs

Fast streaming VCD (Value Change Dump) analysis tool and Python library, written in Rust.

Provides commands to list signals, query metadata, extract time/value pairs, count toggles, search for value occurrences, and diff two VCD files — all with a memory-efficient streaming parser.

Installation

Option 1: pip (Python users)

Installs the vcd_tools_rs command and the vcd_tools Python module:

pip install vcd-tools

The vcd_tools_rs CLI is backed by the compiled Rust extension, so performance is equivalent to the native binary.

Option 2: Precompiled binaries

Download for your platform from GitHub Releases:

Platform Archive
Linux x64 vcd_tools_rs-vX.X.X-x86_64-unknown-linux-gnu.tar.gz
Linux ARM64 vcd_tools_rs-vX.X.X-aarch64-unknown-linux-gnu.tar.gz
macOS Intel vcd_tools_rs-vX.X.X-x86_64-apple-darwin.tar.gz
macOS Apple Silicon vcd_tools_rs-vX.X.X-aarch64-apple-darwin.tar.gz
Windows x64 vcd_tools_rs-vX.X.X-x86_64-pc-windows-msvc.zip
tar xzf vcd_tools_rs-vX.X.X-x86_64-unknown-linux-gnu.tar.gz
./vcd_tools_rs --help

Option 3: Build from source

cargo build --release
# optional: install into ~/.cargo/bin
cargo install --path .

CLI usage

# List signals (optional substring filter)
vcd_tools_rs list simulation.vcd [--filter clk]

# File metadata (signal count, timescale, time bounds)
vcd_tools_rs meta simulation.vcd [--pretty]

# Extract time/value pairs for selected signals
vcd_tools_rs extract simulation.vcd \
  --signal "tb.clk" --signal "tb.rst_n" \
  --start 0 --end 1000000 \
  [--signals-file signals.txt] [--pretty]

# Count value transitions per signal
vcd_tools_rs toggle simulation.vcd \
  --signal "tb.clk" --signal "tb.counter[7:0]" \
  [--start 0 --end 500000]

# Find the Nth occurrence of a signal value
vcd_tools_rs find simulation.vcd \
  --signal "tb.clk" --value 1 --occurrence 3

# Compare two VCD files
vcd_tools_rs compare reference.vcd actual.vcd \
  [--max-mismatches 10] [--ignore-unknown] [--output json|compact]

# Experimental local query server (Unix native build or Unix PyPI wheel)
mkdir -m 700 /tmp/vcd-tools-$USER
vcd_tools_rs serve simulation.vcd \
  --socket /tmp/vcd-tools-$USER/server.sock

Global flags: --pretty (table output), --log-level (error/warn/info/debug).

Experimental server availability

Server mode is available from native Unix builds, Linux/macOS release archives, and Unix PyPI wheels. It binds one VCD to an owner-only Unix-domain socket and supports ping, describe, list, metadata, extract, find, toggles, and cancel using protocol v1 JSON Lines.

After pip install vcd-tools, the same command is available on Unix:

mkdir -m 700 /tmp/vcd-tools-$USER
vcd_tools_rs serve simulation.vcd --socket /tmp/vcd-tools-$USER/server.sock

The socket parent directory must already exist, be owned by the current user, and have no group/other permissions. Windows does not expose this Unix socket mode.

See the protocol contract for request schemas and limits.

See CLI_REFERENCE.md for the complete option reference.

Signals file

One signal name per line. Lines starting with # and inline # comments are ignored:

# signals.txt
tb.U_CHIP.counter[7:0]
tb.U_CHIP.enable
tb.clk          # clock signal

Python API

After pip install vcd-tools:

import vcd_tools

# List signals
signals = vcd_tools.list_signals("simulation.vcd")
signals = vcd_tools.list_signals("simulation.vcd", filter="clk")

# Metadata
meta = vcd_tools.metadata("simulation.vcd")
# → {"signal_count": 42, "timescale": "1 ns", "start_time": 0, "end_time": 1000000}

# Extract time/value pairs
values = vcd_tools.extract("simulation.vcd",
                           signals=["tb.clk", "tb.rst_n"],
                           start=0, end=500000)
# → [{"signal": "tb.clk", "time": 0, "value": "0"}, ...]

# Count toggles
counts = vcd_tools.toggles("simulation.vcd", signals=["tb.clk"])
# → {"tb.clk": 500}

# Find Nth occurrence of a value
result = vcd_tools.find("simulation.vcd",
                        signal="tb.clk", value="1", occurrence=3)
# → {"found": True, "signal": "tb.clk", "time": 30, "value": "1"}

# Compare two VCD files
diff = vcd_tools.compare("reference.vcd", "actual.vcd",
                         max_mismatches=10, ignore_unknown=True)
# → {"passed": False, "total_mismatches": 3,
#    "mismatches": [{"signal": ..., "time": ..., "value1": ..., "value2": ...}], ...}

All functions raise RuntimeError on VCD parse errors or missing signals.


vcd2trace (RISC-V trace extraction)

vcd2trace recreates a RISC-V architectural trace from a VCD file (Aldebaran-style format).

# Default signal paths
vcd2trace simulation.vcd --output trace.txt

# Override paths via JSON
vcd2trace simulation.vcd \
  --signal-path examples/signal_paths.json \
  --output trace.txt

See CLI_REFERENCE.md for the full signal path reference.


Tests

cargo test

Tests use tests/waveform.vcd as the reference fixture.

Notes

  • Large VCDs are streamed from disk; header scope names are sanitized to tolerate special characters.
  • Release builds (cargo build --release) provide the best performance (~6× faster than Python VCD parsers in local measurements).
  • The pip-installed vcd_tools_rs command is a Python entry point backed by the same compiled Rust code; there is no performance difference vs. the native binary.

Metadata

Release files for vcd-tools 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcd-tools 0.1.8
File Size Uploaded Provenance
vcd_tools-0.1.8.tar.gz 3.3 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for vcd-tools 0.1.8
File
vcd_tools-0.1.8-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
vcd_tools-0.1.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
vcd_tools-0.1.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
vcd_tools-0.1.8-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
vcd_tools-0.1.8-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.0 MB

Release files / vcd_tools-0.1.8.tar.gz

Download URL vcd_tools-0.1.8.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4e2f9fd24efbdaa4a7304f74f589c42e7fbc991a65f34a1983d4acdefbed2cf0
BLAKE2b-256 checksum
How to use checksums
19108c728450ccabca94c90468370807d8b02a51b9292676ca4310dace73e7b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Release files / vcd_tools-0.1.8-cp38-abi3-win_amd64.whl

Download URL vcd_tools-0.1.8-cp38-abi3-win_amd64.whl
Size 285.7 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a119b2aeaf36dc525b35437bd2b4221dcf32d0fd0719bb423b089e42b1b627d5
BLAKE2b-256 checksum
How to use checksums
5e04755ab65cf8868e96e7273580389bab9adc0e084c3e33583759f6f7e90999
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Release files / vcd_tools-0.1.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL vcd_tools-0.1.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 657.0 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
380f4e814fac5c4e2513b3f82bfa673830dc251872417c0e3d9f0a91cbac3d1e
BLAKE2b-256 checksum
How to use checksums
2bab9d4054cdf11c08878380939a6aaeb370f83d406a8e6884e0d74947a89478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Release files / vcd_tools-0.1.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL vcd_tools-0.1.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 634.1 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2edfb2a75b99f5def3eb1b1248242308cb512e6794cc4388d85f564905f46f0e
BLAKE2b-256 checksum
How to use checksums
4e5a30b6ce40b7946fca99363babd8eed1ff10391c50b45ede239a155330cce0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Release files / vcd_tools-0.1.8-cp38-abi3-macosx_11_0_arm64.whl

Download URL vcd_tools-0.1.8-cp38-abi3-macosx_11_0_arm64.whl
Size 571.0 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d70a81e625136a35ea504053800e3ba1aa3ef6eb4e45ec290687a7a24398065a
BLAKE2b-256 checksum
How to use checksums
68a8f4753df830d6a1f457872db0dc7e7c1b8eea6f131c92c043b2864afb6e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Release files / vcd_tools-0.1.8-cp38-abi3-macosx_10_12_x86_64.whl

Download URL vcd_tools-0.1.8-cp38-abi3-macosx_10_12_x86_64.whl
Size 600.1 kB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
fa0858686249c3f2074151c0080b65e3af41f83dd5a777f194b77708d17fc24d
BLAKE2b-256 checksum
How to use checksums
893d8873b1021ad45b6c33cc2c2661a0e116222a558a2f502834a71bde8f298a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Security for vcd-tools 0.1.8

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for vcd_tools-0.1.8.tar.gz

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 Sep 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page