Skip to main content

Library for operations with VCD and other digital wave files

Project description

pyDigitalWaveTools

CircleCI Coverage Status PyPI version Documentation Status Python version

python library for operations with VCD and other digital wave files

Feature list

  • parse VCD (std 2009) files to intermediate format
  • write VCD files, user specified formatters for user types, predefined formatters for vectors, bits and enum values
  • dump intermediate format as simple json

Hello pyDigitalWaveTools

Here is a simple example how to use the VCD parser:

#!/usr/bin/env python3
import json
import sys
from pyDigitalWaveTools.vcd.parser import VcdParser

if len(sys.argv) > 1:
    fname = sys.argv[1]
else:
    print('Give me a vcd file to parse')
    sys.exit(-1)

with open(fname) as vcd_file:
    vcd = VcdParser()
    vcd.parse(vcd_file)
    data = vcd.scope.toJson()
    print(json.dumps(data, indent=4, sort_keys=True))

Output json format

scope
{ "name": "<scope name>"
  "children" : {"<children name>" : child}
}

child can be scope or signal record

signal record
{ "name": "<signal name>"
  "type": {"sigType": "<vcd signal type>",
           "width": <bit width of signal (integer)>},
  "data": [<data records>],
}

data record format
[<time (number)>, <value (string, format dependent on datatype)>]

Related open source

  • verilog-vcd-parser - Python, A parser for Value Change Dump (VCD) files as specified in the IEEE System Verilog 1800-2012 standard.
  • pyvcd - Python, vcd writer, GTKWave config writer
  • vcdvcd - Python, vcd parser, dump pretty printer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyDigitalWaveTools-1.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distributions

pyDigitalWaveTools-1.2-py3.10.egg (28.2 kB view details)

Uploaded Source

pyDigitalWaveTools-1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file pyDigitalWaveTools-1.2.tar.gz.

File metadata

  • Download URL: pyDigitalWaveTools-1.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for pyDigitalWaveTools-1.2.tar.gz
Algorithm Hash digest
SHA256 b09c1edad4ebe974341f20f1e8fae07166932a70071bdb9430765146e0e15ce1
MD5 4e25699dc1998e4a092a3ea6da288a61
BLAKE2b-256 ab6e89fb3afa3e53b5955b68f14f2ab731199c89f7b7fd4a247b195cea023218

See more details on using hashes here.

File details

Details for the file pyDigitalWaveTools-1.2-py3.10.egg.

File metadata

  • Download URL: pyDigitalWaveTools-1.2-py3.10.egg
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for pyDigitalWaveTools-1.2-py3.10.egg
Algorithm Hash digest
SHA256 4462ad692340f7401a3e49bfdbb24c50ea904e114c644ece0eb246ecb4ce95e3
MD5 eaa1fc41d450e10dd6b3131d74b213c6
BLAKE2b-256 63af33f02152258a50e2d23c835d006f12a7a2bc5a2a9c84f11dfbd30c299dc0

See more details on using hashes here.

File details

Details for the file pyDigitalWaveTools-1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyDigitalWaveTools-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1a093d4101a59c6030b2d9bd7debeb8c55e13bb06992f8f49447147292e5fc5
MD5 3f18c86f968cf1ef2ac4317cf271e4d3
BLAKE2b-256 881b6e424a6853cd9023bafbc92cc97a6b0cd36ecf4c665843601b3631b7fb5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page