Visible to Intel only — GUID: mwh1410384818503
Ixiasoft
Visible to Intel only — GUID: mwh1410384818503
Ixiasoft
3.9.6. Signal Tap Data Capture with the MATLAB* MEX Function
To set up the Intel® Quartus® Prime software and the MATLAB* environment to perform Signal Tap acquisitions:
- In the Intel® Quartus® Prime software, create an .stp file.
- In the node list in the Data tab of the Signal Tap logic analyzer Editor, organize the signals and groups of signals into the order in which you want them to appear in the MATLAB* matrix.
Each column of the imported matrix represents a single Signal Tap acquisition sample, while each row represents a signal or group of signals in the order you defined in the Data tab.
Note: Signal groups that the Signal Tap logic analyzer acquires and transfers into the MATLAB* MEX function have a width limit of 32 signals. To use the MATLAB* MEX function with a bus or signal group that contains more than 32 signals, split the group into smaller groups that do not exceed the limit. - Save the .stp file and compile your design. Program your device and run the Signal Tap logic analyzer to ensure your trigger conditions and signal acquisition work correctly.
- In the MATLAB* environment, add the Intel® Quartus® Prime binary directory to your path with the following command:
addpath <Quartus install directory>\win
You can view the help file for the MEX function by entering the following command in MATLAB* without any operators:
alt_signaltap_run
- Use the MATLAB* MEX function to open the JTAG connection to the device and run the Signal Tap logic analyzer to acquire data. When you finish acquiring data, close the JTAG connection.
To open the JTAG connection and begin acquiring captured data directly into a MATLAB* matrix called stp, use the following command:
stp = alt_signaltap_run \ ('<stp filename>'[,('signed'|'unsigned')[,'<instance names>'[, \ '<signalset name>'[,'<trigger name>']]]]);
When capturing data, you must assign a filename, for example, <stp filename> as a requirement of the MATLAB* MEX function. The following table describes other MATLAB* MEX function options:
Table 25. Signal Tap MATLAB* MEX Function Options Option Usage Description signed unsigned
'signed' 'unsigned'
The signed option turns signal group data into 32-bit two’s-complement signed integers. The MSB of the group as defined in the Signal Tap Data tab is the sign bit. The unsigned option keeps the data as an unsigned integer. The default is signed. <instance name> 'auto_signaltap_0' Specify a Signal Tap instance if more than one instance is defined. The default is the first instance in the .stp, auto_signaltap_0. <signal set name> <trigger name>
'my_signalset' 'my_trigger'
Specify the signal set and trigger from the Signal Tap data log if multiple configurations are present in the .stp. The default is the active signal set and trigger in the file. During data acquisition, you can enable or disable verbose mode to see the status of the logic analyzer. To enable or disable verbose mode, use the following commands:
alt_signaltap_run('VERBOSE_ON');-alt_signaltap_run('VERBOSE_OFF');
When you finish acquiring data, close the JTAG connection with the following command:
alt_signaltap_run('END_CONNECTION');
For more information about the use of MATLAB* MEX functions in MATLAB*, refer to the MATLAB* Help.