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

Discussion in 'VHDL' started by sdaau, Nov 27, 2011.

  1. sdaau

    sdaau Guest

    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!
    sdaau, Nov 27, 2011
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sajan

    Dumping real signals in VCD

    Sajan, Sep 19, 2003, in forum: VHDL
    Replies:
    8
    Views:
    7,084
    vlsi.engg27
    Jul 21, 2007
  2. neo_anderson

    vsim-vcd-3228 Error vcd simulation

    neo_anderson, Jan 10, 2008, in forum: VHDL
    Replies:
    0
    Views:
    726
    neo_anderson
    Jan 10, 2008
  3. bdb112
    Replies:
    2
    Views:
    1,149
    Jason Scheirer
    Mar 12, 2009
  4. timinganalyzer
    Replies:
    0
    Views:
    593
    timinganalyzer
    Jan 26, 2010
  5. David A. Black

    [ANN] Grepper: object-oriented grepping

    David A. Black, Dec 24, 2008, in forum: Ruby
    Replies:
    1
    Views:
    113
    Tiago Nogueira
    Dec 24, 2008
Loading...

Share This Page