Jump to content

Number of delta cycles exceeds the limit


Amit Bhandu

Recommended Posts

Hello All,
I am facing a SystemC warning:
----------
the number of delta cycles exceeds the limit of 10000, defined in sc_constants.h

this is a possible sign of an infinite loop.

----------

Can you help , what could be possible reasons of this warning, and how could I resolve it?

Thank you very much for your kind help.

Regards,

Amit

Link to comment
Share on other sites

It is what it says it is.

If you have:

void a_thread()
{
   for(int i=0; i<10000; i++) {
      wait(SC_ZERO_TIME);
   }
}

(or similar) - you will get the warning. You can get this in many other ways - example two threads triggering each other within one delta-cycle of each other.

Simulation time is not advancing, only delta cycles are.

Link to comment
Share on other sites

It seems to be this could be an issue for some simulations. There are valid SystemC simulations where time is not advanced. For those simulations, I can see this as being an error. On the other hand, it seems obvious to me that for 99% of simulations this catches coding flaw. I have not looked at the code, but I hope there is a way to change the limit; otherwise, somebody should register an issue on GitHub.

I guess an important issue for the @Amit Bhandu: Are you intending that time should not move forward in your simulation?

Link to comment
Share on other sites

5 hours ago, David Black said:

It seems to be this could be an issue for some simulations. There are valid SystemC simulations where time is not advanced. For those simulations, I can see this as being an error. On the other hand, it seems obvious to me that for 99% of simulations this catches coding flaw. I have not looked at the code, but I hope there is a way to change the limit; otherwise, somebody should register an issue on GitHub.

I guess an important issue for the @Amit Bhandu: Are you intending that time should not move forward in your simulation?

Looks like it is only a warning - simulation itself doesn't terminate.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...