cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1,037 Views
Registered: ‎04-23-2018

using the write_hw_ila_data for a specific signal in hw_ila_data

Hi all

I am using chipscope ILA for record data and then analyze it using python.

I need to use hw_ila_data window with more than 5 signals (due to trigger option) but i want to export just one of them alone to CSV file.

When i use  write_hw_ila_data as describes in UG385 , i didn't see any option to specify the signal i want to export, this TCL command export the whole ila_data_hw window.

Is there any suggestion for me to export a specific signal from the ILA to EXCEL?

 

Itamar Eliyahu

0 Kudos
3 Replies
brimdavis
Scholar
Scholar
1,024 Views
Registered: ‎04-26-2012

itamare@foresight   "I need to use hw_ila_data window with more than 5 signals (due to trigger option) but i want to export just one of them alone to CSV file."

I don't know of any way to export just a single signal using write_hw_ila_data.

However, the CSV format is straightforward to parse to extract a given column of data; although I haven't done this in python, I posted a Matlab/Octave code snippet using textscan() a while back:

   https://forums.xilinx.com/t5/Design-Tools-Others/Export-ILA-captured-Data-in-Vivado2014-4-as-a-Text-file/m-p/750041#M10182

A search on github turned up the following python I2C ILA parser code, which looks like a good starting point; although it is presently written to extract I2C transactions, the I2cParser() class looks easy to modify to extract a given column by name as binary or hex data:

  https://github.com/paulscherrerinstitute/VivadoScripting/tree/master/IlaParsers/I2c

-Brian

 

-Brian

0 Kudos
1,018 Views
Registered: ‎04-23-2018

thank you brian

i thought to use the Matlab textscan function as you mentioned but i have met a problem with the EXCEL raw data when using Hexadecimal format.

what i mean is the conversion of hex number which include E digit , to something like +E0... - for instance : hex value of 0123E0000 will be converted by EXCEL to 0123E+02...., any of cell format option provided by EXCEL didn't help me.

so i need to open the ILA exported EXCEL file with text editor and cut the wanted data

do you have any suggestion?

 

Itamar Eliyahu

0 Kudos
brimdavis
Scholar
Scholar
999 Views
Registered: ‎04-26-2012

itamare@foresight   "any of cell format option provided by EXCEL didn't help me. <snip> do you have any suggestion?"

I don't use Excel for this sort of processing; it will mangle hex and binary fields.

The following Perl one-liner will extract the fourth column (#3, as indexed from 0) of an ILA csv into another text file:

perl -nlaF/,/ -e "print\"$F[3]\"" ila_data_file.csv > column.txt

Note that this script doesn't strip the title header found in the first line.

Note that the above command line quoting works for a Windows command shell; on linux it would be something like this:

perl -nlaF/,/ -e 'print"$F[3]"' ila_data_file.csv > column.txt

-Brian

0 Kudos