Library for operations with VCD and other digital wave files
Project description
pyDigitalWaveTools
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.1.tar.gz
(10.9 kB
view hashes)
Built Distributions
pyDigitalWaveTools-1.1-py3.9.egg
(27.4 kB
view hashes)
Close
Hashes for pyDigitalWaveTools-1.1-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48aee6a2e64b5cabf73c20bfb043548d42c90785e185e932bc4f7714ca2eb7b5 |
|
MD5 | 0375b0b6af3316a82cdd36989374ca74 |
|
BLAKE2b-256 | 790d67d34daecf404c1e8878458cd4d1cf427a3b27855a915b8d34492e241464 |
Close
Hashes for pyDigitalWaveTools-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa1c3b2447786afab3412baa4d86bb4d1df9723a8df7076a1d9976ebdda1874c |
|
MD5 | 12efd45945bb05e95c84abb0cd439d31 |
|
BLAKE2b-256 | 0710c89dcdcb013a5f44019f034251fda561d18dd291e583ead8f9d859669586 |