Amit Bhandu Posted May 15, 2023 Report Share Posted May 15, 2023 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 Quote Link to comment Share on other sites More sharing options...
karthickg Posted May 15, 2023 Report Share Posted May 15, 2023 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. Quote Link to comment Share on other sites More sharing options...
David Black Posted May 15, 2023 Report Share Posted May 15, 2023 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? Quote Link to comment Share on other sites More sharing options...
karthickg Posted May 16, 2023 Report Share Posted May 16, 2023 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.