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?

描述

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?

解决方案

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
日期 05/16/2014
状态 Archive
Type 综合文章
的页面