Cannot parse official example vcd
raczben opened this issue · 2 comments
raczben commented
This example VCD file from the IEEE.1364-2005 specification See 18.2.4 Four-state VCD file format example chapter. cannot be parsed with this parser
Here is my skeleton code:
#!/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 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))
$ python3 vcdpars.py simple.vcd beton@pcdspracbem720t
Traceback (most recent call last):
File "vcdtools.py", line 14, in <module>
vcd.parse(vcd_file)
File "/home/beton/.local/lib/python3.6/site-packages/pyDigitalWaveTools/vcd/parser.py", line 100, in parse
self.keyword_dispatch[token[1]](tokeniser, token[1])
File "/home/beton/.local/lib/python3.6/site-packages/pyDigitalWaveTools/vcd/parser.py", line 157, in vcd_scope
assert scopeType[1] == "module", scopeType
AssertionError: (12, 'task')
Nic30 commented
Hello, the assert was wrong, now it should be fixed.
raczben commented
Thanks for the fast reply, and fix.
It solves. This issue can be closed, from my point of view