User guide

System Generator for DSP User Guide www.xilinx.com 139
UG640 (v 12.2) July 23, 2010
Using ChipScope Pro Analyzer for Real-Time Hardware Debugging
Importing Data Into the MATLAB Workspace From ChipScope
Now you can export the data captured by ChipScope™ back into the MATLAB workspace.
1. Export data from ChipScope Pro Analyzer
Select File > Export option from within ChipScope Pro Analyzer. Select ASCII
format and choose Bus Plot Buses to export. Press the Export button and save the
file as sinecos.prn.
2. Start MATLAB and change the current working directory to the location where you
saved sinecos.prn.
Type xlLoadChipScopeData('sinecos.prn'); This loads the data from the
.prn file into the MATLAB workspace. In the workspace there are two new
arrays named Sin and Cos.
3. You can plot the values using the MATLAB plot function.
Type: plot(1:1024, sine, 1:1024, cosine) and the following plot is
generated: