AR# 21955


CORE Generator - An error occurred while running Java (possibly due to memory limitations)


When attempting to generate a CORE Generator core, the following error occurs:

"ERROR:coreutil - An error occurred while running Java. This may be due to memory limitations.

You can adjust the memory dedicated to Java by going to the Preferences dialog available from the File menu. Please consult (Xilinx Answer 21955) />


This error message occurs any time the Java application run by CORE Generator fails for any reason. Be sure to scroll through the CORE Generator output messages in the console or "coregen.log" file to find the first error that occurs. For more in-depth messages in the CORE Generator console, launch CORE Generator from the command line with the debug and Java verbose switch:

-d (Normal Debug)
-dd (Detailed Debug)
-ddd (Verbose Debug)
-J verbose (JAVA Verbose Mode)

Following are some of the issues known to cause this error without generating additional (or easy-to-find) error messages.

Memory Limitation

If no other error messages are reported, the Java failure might have resulted from a memory limitation. Java requires that the maximum amount of memory be allocated when the Java application is invoked. By default, CORE Generator invokes Java with a 1024 Mbyte maximum. Some of the cores, such as large FIFOs and memory cores, require additional memory to generate.

To adjust the memory dedicated to Java, select File -> Preferences from the CORE Generator menu. In the Memory Dedicated to Java field, change the value.

For more incremental control over the Java Memory allocation, you can invoke CORE Generator from the command line using the "-J Xmx" option as follows:

Syntax: coregen -J Xmx<num>m

NOTE: Using "-J Xmx" from the command line overwrites the value specified in the GUI.

The command line "coregen -J Xmx1732m" instructs CORE Generator to request 1732 Mbytes of memory when initializing the JVM.


coregen -J Xmx2500m
coregen -J Xmx256m

Following are some typical values (any positive integer value is allowed) that you can use:

Xmx256m, Xmx384m, Xmx512m, Xmx768m, Xmx2048m, or Xmx4096m

Allocating more memory than is available from the system results in an immediate error indicating that the JVM could not be initialized.

The maximum heap size is machine-dependent. Window XP systems usually have a limit around the 2-Gbyte range. Most Windows NT systems and some Windows XP systems cannot allocate the 1024 Mb default; consequently, they require the 256 Mb or 512 Mb setting.

The total physical memory (plus the virtual memory) must be greater than or equal to the command line memory setting for CORE Generator. Setting the "Xmx" option to a larger value also ties up this amount of memory for your CORE Generator session. Other applications will not be able to utilize this memory until CORE Generator is terminated.

XST Synthesis Errors

Most cores created after 2005 are C++ based and require only Java for some of the interface and peripheral work. For these cores, the compilation of the core netlist is completed by XST synthesis. If the XST fails for some reason, the failure is not passed back to CORE Generator through the Java interface. Consequently, it is a good idea to check the XST log file created in the temporary directory. In most cases, the temporary directory is named "tmp" and is located directly under the project directory. However, the location and name are controlled by the "Temporary Directory" setting in the Advanced tab of the Project Options window.

Invalid Temporary Directory Location

This error might appear if the CORE Generator project is copied to a new location and the Temporary Directory setting on the Advanced tab of the Project Options window is not updated with the new location.

Spaces in Directory Paths

Check to see if there are spaces in the directory path of the current project, the Xilinx install directory, or the Temporary Directory specified in the project options.

User Guide for the Core is open

On some computers, the user guide (.pdf) file for the core cannot be open or the core generation will fail. Running CORE Generator in debug mode reveals a message similar to the following:

" ERROR:coreutil - FATAL: Associated file project_directory\fifo_generator_ug175.pdf (The process cannot access the file because it is being used by another process) could not be found."

In this case, the User Guide needs to be closed before the core can be generated.

LD_LIBRARY_PATH set incorrectly on Linux

Please check that the LD_LIBRARY_PATH environment variable is pointing to the %Xilinx%bin/lin directory.

Invoking CORE Generator from a Subdirectory Parallel to Project Directory

See (Xilinx Answer 25370) />
To launch CORE Generator from the command line, you can enter "_cg" instead of "coregen."

Also, see (Xilinx Answer 23574) />

Linked Answer Records

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
35389 12.1 CORE Generator - Setting JAVA memory size from CORE Generator interface does not work N/A N/A
AR# 21955
Date 12/15/2012
Status Active
Type General Article
Tools More Less
People Also Viewed