Setting Recursion Limit in XST

XST(Xilinx®) is the tool used in ISE® software to synthesize VHDL, Verilog or mixed languages and to create Xilinx® specific netlist files known as NGC files. To have an overview on XST® synthesis please refer the following link.

There was a misconception that hardware design is incapable of implementing recursion functions. Of course Verilog ’95 did not support recursion but later Verilog 2001 introduced Recursion to be generated in designs. But one thing that a real hardware programmer must keep in mind is hardware programming is more concerned on parallel execution rather than being sequential as in typical programming languages. But for hardware designs with tree structure it is better to have recursion in the design. One useful place related to recursion can be found in the following link.

I have a question to ask from you. Have you ever tried a recursive function (having a considerable depth) ? Then you would have noticed following error message (as i myself encountered).

Function ‘<your_function>’ has iterated 64 times. Use “set -recursion_iteration_limit XX” to iterate more.

And then probably you would have googled it and found the following link.

As a novice I felt bit hard on the implementation of what have been given in the above link. Yes again I googled it. Again I googled it and again and again. Even the error message itself and the link above are more than enough for a ‘veteran’ in ISE® environment, I had to. After I am done (not as fast as I am writing) with this issue I thought to blog this out (nothing miracle happened, believe me).

Please note that my version of ISE design suite is 14.6 and my OS is windows 7. The steps I recommend you to resolve the issue under this topic is listed down as follows.

Step I: Go to the working directory of your design (project).

Step II: Find and open the (say) “main_module.xst” file in your directory. (this file’s icon looks like an Microsoft Office Outlook file)


project’s .xst extension file – first few lines

Step III:  Copy and paste this file to a new file and save under a different name (say) “main_module_new.xst” in the same directory. (This is because to avoid the file being overwritten by the Project Navigator.)

Step IV: Insert the following line at third line in the file you created.

                                                                          set -recursion_iteration_limit 256


Project’s newly modified .xst extension file – first few lines

Now what all you have to do is, generate all synthesized files. To do this,

Step V: Go to Start -> All Programs -> Xilinx Design Tools -> ISE Design Suite 14.6 -> Accessories and open ISE Design Suite Command Prompt.

Step VI: First of all navigate to the directory where your project lies.

Step VII: Run XST® on newly created .xst file (main_module_new.xst) using following command.

                                                                             xst -ifn main_module_new.xst

It will take some time to compile.

Step VIII: After that ‘Implement Design’ and other further activities can be carried out based on modified project files.

Thats all. Feel free to raise any question under this topic.