Hi does anyone already made a tcl command to write down any signals from the wave into a CSV file (excel compatible) thanks for your help
jacky
Hi does anyone already made a tcl command to write down any signals from the wave into a CSV file (excel compatible) thanks for your help
jacky
It's rather easy to write a single CSV record in Tcl:
# First argument $file is a Tcl file handle # obtained from the [open] command. Second argument $arglist # is a Tcl list of the items in the comma-separated record. # proc writeCSVrecord {file arglist} { puts $file [join $arglist ,] }
And you can quite easily combine that with the [examine] command:
# Second argument $signals is a list of signal names # to include in the CSV record proc writeCSVsignals {file signals} { set values [list] foreach sig $signals { lappend values [examine $sig] # or ... lappend values $sig [examine $sig] # if you also want the signal name in the file } writeCSVrecord $file $values }
Now it's simply necessary to open a file for output, call procedure [writeCSVsignals] as many times as required, and finally close the file.
-- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK jonathan.bromley@MYCOMPANY.com http://www.MYCOMPANY.com The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated.
many thanks Jonatham have a great day
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.