This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Troubleshooting Hardware-Software Co-Design

Resolve issues encountered while using the hardware-software (HW/SW) co-design workflow.

Model stops responding or locks up

Problem

In external mode, the Simulink® time counter does not increment. This problem can occur with a misconfigured loop scheduler.

Possible Solution

  1. Stop the model from running on the hardware. In these commands, replace ModelName with the name of your Simulink model.

    devzynq = zynq('linux','192.168.3.2','root','root','/tmp');
    stop(devzynq,'ModelName')
  2. Verify your choice of scheduler, frame sizes, and associated timeout values. If the ARM® software is not receiving schedule ticks from your source, the model cannot run. The transmit interrupt scheduler in particular can cause this behavior.

Model sensitive to block ordering

Problem

If your model is sensitive to the execution order of the blocks, the default Simulink ordering can cause unexpected behavior. For example, if your model requires the transmitter to start before the receiver and the default ordering starts the receiver first, unexpected behavior occurs.

Possible Solution

Use the Simulink sorted order to specify priorities of the blocks. See Control and Display the Sorted Order (Simulink).

Model exits without an error message

Problem

The model compiles, downloads to the hardware, starts running, and exits immediately.

Possible Solution

Two different errors can cause this behavior:

  • You attached a Stop Simulation block to a transmitter or receiver overflow or underflow port, and an overflow or underflow occurred. Verify that your frame rates work without timeout failures in the context of the baseband sample rate and user logic functionality on the FPGA.

  • You did not load the required FPGA image into the hardware. The software attempts to read and write from addresses that correspond to the user logic IP core. If the core is not present, the processor stops.

Command codertarget.zynq.internal.setupTokens() throws an error

Problem

The command codertarget.zynq.internal.setupTokens() throws this error:

Code generation cannot proceed because the following file or folder could not be found:
C:\ProgramData\MATLAB\SupportPackages\R2016b\toolbox\target\supportpackages
\zynq\registry\thirdpartytools\thirdpartytools_win64.xml

This error occurs when third-party tools are not set up correctly.

Possible Solution

Check the installation details on Installation for Hardware-Software Co-Design. Make sure that additional support packages are installed and configured as described in steps 4 and 5.

Software Interface Model Fails to Build

Problem

The build procedure for the software interface model fails with the following error:

rtiostream_utils.h: No such file or directory
#include "rtiostream_utils.h"  
                            ^
compilation terminated. 
gmake: *** [rtiostream_interface.c.o] Error 1

Possible Solution

Set the simulation mode of your model to External before building the model.

Warning in External Mode

Problem

When running the model in external mode,​ the MATLAB® command window displays the following warning message.

Warning: No data has been selected for uploading

The warning indicates that the model does not contain a sink block to which external mode can send data.

Possible Solution

You can disregard this warning. Alternatively, add a sink block and rerun the model.

Related Topics