The introduction of PLI is another layer of complexity to determining the cause of a hanging simulation. The way the simulator works with a PLI is when a PLI is encountered, control is passed to the PLI to execute it's function. Once the PLI completes its code processing, control is given back to the simulator. So another possible source of the hang could be the coding within the PLI.
I would encourage you to check with Synopsys to make sure that you have the latest version of their PLI. I'd also make sure that the latest IUS version is being used. You should also open a service request with Synopsys as well as our support team (firstname.lastname@example.org) and include a testcase so that the situation can be investigated.
In regard to the hang you are seeing with using the Synopsys STIL PLI, you might try to use the nbasync command line option in your simulation as follows:
if you are using ncvlog/ncelab/ncsim or irun add -nbasysnc to the ncsim or irun command line.
If you are using ncverilog to run the simulation add +nbasync.
Basically this options changes the order in which synchronization callbacks are executed within the event cycle. Give it a try and let us know if that helps.
First thanks for your explanations and help.
I would like to clarify one point: In my situation the time is frozen and delta cycles are not also counting up. Simulator doesnt respond to my pause command(I used both the pause button and ctrl+C).It only come out of its infinite run with multiple ctrl+Cs and that multiple ctrl+Cs are causing the simulator to terminate.
When I try to do line-by-line debugging very close to the hanging time, I lost the yellow arror(it gets grayed out) somewhere close to that hanging time and I can't know where is the last statement executed before entering that infinite loop.It could be somewhere in one of those c library.
If it was a delta cycle issue, it would be much and much more easy to debug as I can trace the code and see the feedback path, but now I can do simply nothing other then givin multiple ctrl+C commands end then let the simulator terminate.Therefore even if I enable a breakpoint of 1 delta cycles, simulator hangs before even a single delta cycle!!!!
By the way, +nbasync option couldn't solve the issue, but it chaned the hanging time point. When I recompile the same design at different times, it also changes the hanging time point as well.
How can I also check the compatibility of STIL DPV libraries, simulator and the compiler that I use for my .c files' compilation.