UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 18623

System Generator for DSP - How can I exit the Simulation Stop Function when performing a generate in System Generator for DSP?

Description

If I try plotting variables in the Simulation Stop Function of my ".mdl" file, the function fails and the generate process exits. How can I exit the Simulation Stop Function when performing a generate in System Generator for DSP?

Solution

This occurs because System Generator for DSP is incorrectly calling out the Simulation Stop Function before the Simulation completes in Simulink and the variables it is trying to access have not been created yet. 

 

To avoid this issue, follow these steps: 

 

1. Remove the offending variable from the Simulation Stop Function. 

2. Uncheck create testbench or check for the variable that is failing and also check to see if it is empty in the function. If it is empty, exit the function and continue with the generation process. 

 

Example 

 

if ((~exist('ySignal','var') & ~exist('NPixels','var')) || (~isempty(ySignal))) 

return; 

end

AR# 18623
Date Created 09/03/2007
Last Updated 05/16/2014
Status Archive
Type General Article