Main

11.3 System Generator for DSP - How do I set up my tool environment properly to run System Generator? Why do I receive Internal Error, Fatal Error, caught standard exception, or unknown exception from MEX file errors?

AR# 31095

Search For Another Answer

Topic SW-SysGen
Last Updated 09/10/2009
Status Active
Description

Keywords: SysGen, mex, mdl, model, simulate, Internal, Fatal, Error, std, standard exception

When I try to simulate any model with a System Generator for DSP block in it, I receive one of the following error messages:

"Error in 'TestBlink/Constant' while executing C MEX S-function 'sysgen', (mdlTerminate), at time 10. MATLAB error message: Unexpected unknown exception from MEX file."
"Error 0001 caught standard exception, or an Internal Error or Fatal Error is reported."

How do I set up my system environment properly to use System Generator for DSP to avoid these types of errors?

Solution

These errors are typically caused by a problem in the system environment setup.

Check your version of System Generator by typing the following at the MATLAB command prompt:
>> xlVersion

Check your version of MATLAB by typing the following at the MATLAB command prompt:
>> ver

Check your version of the Xilinx ISE tools by typing the following at the MATLAB command prompt:
>> system('xinfo')
and go to the fileset.txt tab to confirm the version listed for each Xilinx tool.

Next, make sure you have the latest service packs for all Xilinx tools and double-check that you are using compatible versions of all tools (including service packs and IP updates). See (Xilinx Answer 17966).

Finally, check that the following environment variables are set as follows, under the "System Variables."

NOTE: To access your Windows environment variables, open the "System Properties" from the Control Panel and go to the Advanced tab.

PATH environment variable
The PATH environment variable should include the following paths in one concatenated list:

System
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

MathWorks
<MATLAB INSTALL DIR>\bin\;<MATLAB INSTALL DIR>\bin\win32;

where, for example <MATLAB INSTALL DIR> is C:\Program Files\MATLAB\R2007b\

It is best to have the version of MATLAB which you are using for System Generator listed before any other MATLAB paths on your machine.

Xilinx:
%Xilinx%\bin\nt; %Xilinx\lib\nt
optional:
C:\Xilinx\11.1\ChipScope\bin\nt;%Xilinx_EDK%\bin\nt;%Xilinx_EDK%\lib\nt;

It is important that the "\bin\nt" directory be listed before the "\lib\nt" directory.

Xilinx environment variable
XILINX = C:\Xilinx\11.1\ISE
XILINX_DSP = C:\Xilinx\11.1\DSP_Tools\nt

where C:\Xilinx\11.1 is the ISE installation directory.

TEMP environment variable
Starting in 11.2 the TEMP or TMP environment variable will be used to determine where core generation will occur. If your TEMP or TMP environment variables point to a long path name, it is possible that this will cause errors during generation.

It is recommended that you set TEMP and TMP to C:\temp.

For more details about this, see (Xilinx Answer 23614).

For other possible causes of "standard exception" fatal errors, see (Xilinx Answer 29430).
 
 
/csi/footer.htm