A method for using Matlab to call signaltap to collect data

September 14, 2020

Recently, in the use of FPGA to collect data, the front end is acquired by AD, and then directly output to the FPGA. The collected data needs to be analyzed. The usual method can only be in signaltap, right click on the signal list and click “Create SignalTap II List File” to generate the data. Data file, operation shown in Figure 1, Figure 2 is the generated data file, when processing data, first copy all the data in the file to ultraedit, and then extract the column of data to be processed through the column mode, copy it to matlab for subsequent Analytical processing.


figure 1


figure 2

The above operation method is relatively cumbersome, mainly because there are many manual operations. If more data needs to be collected, it is necessary to repeat the operation many times. It is really a physical activity, and it is inevitable that the operator is bored. The following describes a method of directly calling signaltap to collect data through matlab.

Only the following statement is required on the matlab side:

Addpath ('d:/altera/11.0sp1/quartus/bin');

Din = alt_signaltap_run('stp1.stp', 'signed');


The addpath statement adds the quartus software path; the alt_signaltap_run statement performs data collection. Of course, the corresponding *.sof file should have been downloaded to the FPGA. The 'signed' returns the signed data; alt_signaltap_run('END_CONNECTION The ') statement indicates that the jtag connection established by matlab is broken.

With this method, without having to open signaltap, matlab directly acquires data for processing, eliminating a lot of repeated manual operations and greatly improving work efficiency.

12V Battery Packs

Solar Battery Pack,Dewalt 14.4 V Battery,External Battery Pack,Mophie Battery Pack

Zhejiang Xinghai Energy Technology Co.,Ltd , https://www.headwayli-battery.com