주요 콘텐츠

Simulate with I/O Data Recorded from Altera SoC Device

R2026b

This example shows how to use real-world data recorded from an Altera® SoC device in simulation.

Supported hardware platforms:

  • Altera® Cyclone® V SoC development kit

  • Altera Arria® 10 SoC development kit

In many situations you may want to verify your algorithm against real-world data. This example shows how to use the recorded data signal in a simulation of the generated processor system model of the complete SoC application.

Complete the Streaming Data from Hardware to Software Using AMD SoC Devices (SoC Blockset) example before you run this example.

Use Recorded Data in Simulation

In this section, you simulate the processor subsystem of the SoC application model with recorded data as input. The processor subsystem of the SoC application uses the AXI4 protocol to stream data from external memory and determine if the signal contained in the data is either high or low frequency. An IO Data Source block replaces the external memory and the FPGA subsystem of the model with playback of the AXI4 stream data. Use the data recorded in Record I/O Data from AMD SoC Device (SoC Blockset) example.

open_system('alterasoc_signal_detection');

close_system('alterasoc_signal_detection',0);

1. Open Signal Detection model.

2. Open IO Data Source block mask.

3. Click Browse and select the matlab\toolbox\soc\supportpackages\intelsoc\intelsocexamples\zynq_sine_data.tgz file that contains recorded data.

4. Click Select and choose the data source within the data file to playback. Click OK to close the block mask dialog.

5. Run the Simulink® model and open Vector Scope to observe the recorded data.

6. To access the recorded data in MATLAB®, use socFileReader.

h = socFileReader('altera_sine_data.tgz');
data = getData(h,'AXI4 stream interface');

The returned data is a time series object of uint32. To plot the data in MATLAB, convert uint32 to int32.

plot(data.Time, typecast(data.Data,'int32'));

See Also

Record I/O Data from AMD SoC Device (SoC Blockset)