A python grepper script to split / select / filter VCD signals

S

sdaau

Hi everyone,

Apologies for cross-posting - just wanted to post about this, since I
had trouble finding something similar elsewhere.


The GHDL webpage currently says:

http://ghdl.free.fr/ghdl/Simulation-options.html
Currently, there is no way to select signals to be dumped:
all signals are dumped, which can generate big files.

.... and as I didn't have much luck finding existing VCD signal
"splitters" (that would isolate a signal from a bundle), here's my
attempt at a python script that will act as a "grepper" for vcd
signals:

http://sdaaubckp.svn.sourceforge.net/viewvc/sdaaubckp/single-scripts/vcd-sig-grep.py?view=markup


As always, the usual YMMV applies :) For myself, the script was tested
under python 2.7 (which seems slightly faster) and 3.2 on Ubuntu 11.04
Linux, and should work with piping to stdin - I have pretty much
tested it only with GHDL output, as in:

ghdl -r test_workbench --stop-time=20000us --vcd=/dev/stdout |
python2.7 vcd-sig-grep.py --sigs="signal1,signal2" > tmpout.vcd


.... and for test workbench, I've just used the file/approach here:

SourceForge.net: ngspice: VHDL sim'd .vcd data - as analog sim source
-
http://sourceforge.net/projects/ngspice/forums/forum/133842/topic/4839104

Note there is no special handling of '$dumpvars' and such (however,
GHDL seems not to output them anyways)... I've tested the .vcd output
with gtkwave only, seems to be read in fine.


Well, if there's a similar tool that I obviously missed (apart from
gtkwave used with a tcl script, which is used in the above ngspice-
users entry), I sure would like to know about it.

Otherwise, I hope the community may find this useful...

Cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top