Fast VCD file analysis tools (list, extract, toggle, find, compare)
Project description
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]
Global flags: --pretty (table output), --log-level (error/warn/info/debug).
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_rscommand is a Python entry point backed by the same compiled Rust code; there is no performance difference vs. the native binary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vcd_tools-0.1.7.tar.gz.
File metadata
- Download URL: vcd_tools-0.1.7.tar.gz
- Upload date:
- Size: 3.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98471a2f82c94765d97357200735b2206b3bea500eff5bf979b22eb455e7d57
|
|
| MD5 |
f3c543f101dca536d7cfbf75a6f0f3b3
|
|
| BLAKE2b-256 |
f573d5745e165822baddff6a98eda74be29c1c6aadb1029283178918b91e0407
|
Provenance
The following attestation bundles were made for vcd_tools-0.1.7.tar.gz:
Publisher:
publish-pypi.yml on rbarzic/vcd_tools_rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcd_tools-0.1.7.tar.gz -
Subject digest:
a98471a2f82c94765d97357200735b2206b3bea500eff5bf979b22eb455e7d57 - Sigstore transparency entry: 1553883245
- Sigstore integration time:
-
Permalink:
rbarzic/vcd_tools_rs@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/rbarzic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcd_tools-0.1.7-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: vcd_tools-0.1.7-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 241.4 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
663ddf87579441b229c4e16536eba8bdf02b87d41893b5132011b6711bff26e0
|
|
| MD5 |
6a25553cfea787fb20fca2cdba1ca57b
|
|
| BLAKE2b-256 |
01982f396f69fe849831d7314b1909398ab8e2f7e6168d69077fc8f1b24f949d
|
Provenance
The following attestation bundles were made for vcd_tools-0.1.7-cp38-abi3-win_amd64.whl:
Publisher:
publish-pypi.yml on rbarzic/vcd_tools_rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcd_tools-0.1.7-cp38-abi3-win_amd64.whl -
Subject digest:
663ddf87579441b229c4e16536eba8bdf02b87d41893b5132011b6711bff26e0 - Sigstore transparency entry: 1553883303
- Sigstore integration time:
-
Permalink:
rbarzic/vcd_tools_rs@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/rbarzic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 384.1 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e320fa7a0a6121a977818c1108ef79daccdc1ef03ded61cf42a27bf92e84015
|
|
| MD5 |
54b351037f9bc39dc3f7ecb647ebf32b
|
|
| BLAKE2b-256 |
0a270e2206c2c35c16e92a250a2c15b72a9efabe00ff31deeec9d462f2e67667
|
Provenance
The following attestation bundles were made for vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-pypi.yml on rbarzic/vcd_tools_rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0e320fa7a0a6121a977818c1108ef79daccdc1ef03ded61cf42a27bf92e84015 - Sigstore transparency entry: 1553883328
- Sigstore integration time:
-
Permalink:
rbarzic/vcd_tools_rs@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/rbarzic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 375.7 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d807cae2a463de26192b790a320d3714271a5c5925cac05203c7eed46325d169
|
|
| MD5 |
4019c2cffd1ea0471679aef3923882dd
|
|
| BLAKE2b-256 |
efda85ab75c6ae2059a50a6d3eea8d0331b818088e57cc1182e4944af2767985
|
Provenance
The following attestation bundles were made for vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-pypi.yml on rbarzic/vcd_tools_rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcd_tools-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
d807cae2a463de26192b790a320d3714271a5c5925cac05203c7eed46325d169 - Sigstore transparency entry: 1553883364
- Sigstore integration time:
-
Permalink:
rbarzic/vcd_tools_rs@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/rbarzic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcd_tools-0.1.7-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: vcd_tools-0.1.7-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 340.9 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e942c49d94979ae490e11a7101b396c80b09dadd69d7cf6c8347d555490baef8
|
|
| MD5 |
b094a1301f114b3a8f9dc5a5fc71fb00
|
|
| BLAKE2b-256 |
e81ed65286016a5779627e8ff6d5f91372438b896b5cc0e5a4b7ec29b5b729e4
|
Provenance
The following attestation bundles were made for vcd_tools-0.1.7-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-pypi.yml on rbarzic/vcd_tools_rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcd_tools-0.1.7-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
e942c49d94979ae490e11a7101b396c80b09dadd69d7cf6c8347d555490baef8 - Sigstore transparency entry: 1553883251
- Sigstore integration time:
-
Permalink:
rbarzic/vcd_tools_rs@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/rbarzic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcd_tools-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: vcd_tools-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 347.4 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9f4dbf018dba25a1a525bc8153178ec0be3948c02d868c7b5098b0879af7712
|
|
| MD5 |
e124e1d101d25fe69ac253e88744a045
|
|
| BLAKE2b-256 |
055cdb687ba9b255bebde27bef18de91d3088142958332a82e2d55cb28a754b5
|
Provenance
The following attestation bundles were made for vcd_tools-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-pypi.yml on rbarzic/vcd_tools_rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcd_tools-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl -
Subject digest:
e9f4dbf018dba25a1a525bc8153178ec0be3948c02d868c7b5098b0879af7712 - Sigstore transparency entry: 1553883270
- Sigstore integration time:
-
Permalink:
rbarzic/vcd_tools_rs@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/rbarzic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d2424ccb93b103df04436ad4cfe808f79b345f8c -
Trigger Event:
push
-
Statement type: