Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Iteration Limit error in VHDL Modelsim

Tags:

vhdl

modelsim

I'm writing VHDL code for a d-flip-flop on Modelsim and I get an error when I try to simulate it:

Error: (vsim-3601) Iteration limit reached at time 400 ps.

I'm not sure what it means, but I've looked through much of my source code for errors to no success. Can anyone guess what the problem might be?

like image 798
user607444 Avatar asked Oct 24 '25 01:10

user607444


2 Answers

This error usually indicates that ModelSim is stuck in an infinite loop. In VHDL, this can happen when a signal is placed in the sensitivity list and this signal is changed in the process. The signal changes, triggering the process, which changes the signal, which again triggers the process and the cycle continues.

The following is a simple example of a process that causes an infinite loop:

PROCESS (count)

BEGIN

count <= not count;

END PROCESS;
like image 118
Ahmed Soliman Avatar answered Oct 26 '25 21:10

Ahmed Soliman


If your iteration limit is reached, that means the system hasn't stabilized. Most likely it is something like:

a <= b;

--- and then later...

b <= a;

like image 36
Aaron D. Marasco Avatar answered Oct 26 '25 21:10

Aaron D. Marasco



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!