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# 18429

XST - "ERROR:Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more."

Description

When compiling HDL source through XST, I receive the following error:

"ERROR:Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more."

Solution

This error occurs if XST encounters a loop (typically a "while loop") that does not have a discrete termination. Rather than unrolling the loop forever, XST fails with this error during HDL analysis. A line number is not provided, but the error is reported within the context of the entity/module that is being analyzed.

Examine the loop in your source code and make sure that it is bounded by finite values before running synthesis again.

If the loop does have a finite number of iterations and that number is greater than 64, you can apply the "-loop_iteration_limit" command as mentioned in the error message. This command is not available from Project Navigator under the "Other XST Command Line Options" selection; these options are "run" commands. However, the loop command is a "set" command (it defines the working environment).

If you are using Project Navigator In ISE 7.1i and below:

1. Look in the "_projnav" directory for the ".xst" file for your project.

2. Copy this file to the main project directory (so it will not be overwritten by Project Navigator).

3. Then add the line (as shown below) before the "run" command.

If you are using Project Navigator in ISE 8.1i and above:

1. Look in the main project directory for the ".xst" file for your project.

2. Copy this file to a different name (so it will not be overwritten by Project Navigator).

3. Then add the line (as shown below) before the "run" command.

For example, if you want to iterate a loop 256 times, add the following before the "run" command:

<code>

set -tmpdir __projnav

set -xsthdpdir ./xst

set -loop_iteration_limit 256

run

-ifn top.prj

-ifmt mixed

-ofn top

-ofmt NGC

...

</code>

To run your project through XST, open a command window, navigate to the project directory and run XST on this modified ".xst" file as follows:

<code>

xst -ifn <project>.xst

</code>

To continue working in ISE, you must create a new NGC-type project and use the recently created <project>".ngc" file as the source.

AR# 18429
Date Created 09/03/2007
Last Updated 12/15/2012
Status Active
Type General Article