Main Content

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 Execution Order.

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.

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