Skip to main content

Library for operations with VCD and other digital wave files

Project description


Build Status 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]
    print('Give me a vcd file to parse')

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

Output json format

{ "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

Project details

Download files

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

Files for pyDigitalWaveTools, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size pyDigitalWaveTools-1.0.tar.gz (17.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page