Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16790 Discussions

Questa simulation hangs (nondeterministic)

c-thaler
New Contributor I
1,229 Views

I run a Questa simulation for an IP core from the command line on a Linux server. Usually, the simulation finishs successfully. But every now and then the simulation hangs.
When it hangs, I can see that the CPU load is 100% but I can't break the simulation by hitting Ctrl-C. The key-press is detected ("# Break key hit") but the simulation won't halt.

Since I use the same seed for random number generation in each run, this seems like nondeterministic behavior.

I have no clue, where this behavior is comming from. Are there any command line options that I can use to get closer to the problem? How can I go one with debugging in such a case?

Labels (1)
0 Kudos
22 Replies
c-thaler
New Contributor I
1,124 Views

I tried to run all processes with valgrind. This causes the simulation to terminate with:

"Process terminating with default action of signal 41 (SIGRT9)"

and

"Trouble with Simulation Kernel."

 

Of course, this might be a side effect of valgrind.

0 Kudos
c-thaler
New Contributor I
1,059 Views

I tried a testbench from another project with valgrind and it works fine. So it seems there is really something wrong with the simulator.

0 Kudos
c-thaler
New Contributor I
1,031 Views

I was able to reproduce the hang up on a Windows system.
In contrast to the Linux system I was able to stop the process with Ctrl-C leading to the following output:

vish lost connection to vsim process.

                                                                                                                                                                                    
simulator: Unexpected EOF on RPC channel sock0000000007A71780
Kernel lost connection to front end process.
** Fatal: Exiting VSIM license process.
0 Kudos
TingJiangT_Intel
Employee
1,022 Views

As it worked fine after you changed the project, the error may related to the project and testbench. It may be that your project got stuck during simulation, causing excessive CPU resource usage.

You may check your testbench to see if there are any operations that cause an infinite loop.


0 Kudos
c-thaler
New Contributor I
1,019 Views

Thanks for the reply.

Questa is able to detect zero delay loops, so I should see an error about this. Furthermore, most of the time the tests run just fine. I have to run a single test a few hundred times to cause this behavior. That means it is nondeterministic behavior. If there is an infinite zero delay loop I should see the hang up in every simulation run.
Besides that, I should be able to break/pause simulation in such a loop, which does not work either.

0 Kudos
c-thaler
New Contributor I
934 Views

I was able to reproduce with the other project, too. It took a few thousand simulation runs over the weekend. But finally it got stuck with 100% CPU load.

0 Kudos
TingJiangT_Intel
Employee
933 Views

I see, can you upload your project and tell me your detail operation steps to help me reproduce the issue?


0 Kudos
c-thaler
New Contributor I
916 Views

The whole project is quite huge. I will try to reproduce the issue with a smaller example, e.g. a module test. This may take a few days.

0 Kudos
TingJiangT_Intel
Employee
907 Views

Ok, really appreciate for this.


0 Kudos
c-thaler
New Contributor I
872 Views

I'm finished with the smaller example. How can I upload the shipment without making it available to the public?

0 Kudos
TingJiangT_Intel
Employee
754 Views

Hi there, I have sent you an email, you can upload your project via it.



0 Kudos
TingJiangT_Intel
Employee
704 Views

Hi there, I noticed that your email has been blocked. Seems it contains some files that is not allowed.

Please check the attachments. You can upload qar file after archived.


0 Kudos
c-thaler
New Contributor I
686 Views

Thanks for he response. I'll try it again.

Unfortunately, I cannot build an qar file since it is not an Quartus project. All Questa call are made from a Shell Script. The mail was probably blocked because of this script, since it is executable.

0 Kudos
TingJiangT_Intel
Employee
545 Views

Hi there, is there any updates on this issue?


0 Kudos
c-thaler
New Contributor I
532 Views

Hi,

I've sent you another mail on 07-19 with a reproducible example attached. Was it blocked again?

0 Kudos
c-thaler
New Contributor I
532 Views

I've sent you another mail with a link to our file exchange server, where I've just uploaded the reproducible example.

0 Kudos
TingJiangT_Intel
Employee
416 Views

Hi there, I checked your script. It seems that you are not using the officially generated scripts. Using non-official scripts can lead to unpredictable behavior during simulation. It is recommended to use the simulation scripts generated by Quartus. For more details, please refer to the following link:

https://www.intel.com/content/www/us/en/docs/programmable/730191/24-1/generating-a-msim-setup-tcl-simulation.html


0 Kudos
c-thaler
New Contributor I
396 Views

In my case, there are no generated scripts since I'm not using any Intel IP in the simulation. It is just a testbench for a simple module.

0 Kudos
TingJiangT_Intel
Employee
331 Views

Yes, but seems you write many scripts yourself, we can't make sure if there is any issue related to these flow. With the generated script it will ensure all the necessary file is included and the flow was verified.


0 Kudos
c-thaler
New Contributor I
322 Views

Well, the script and the flow work 99.9% of the time. But every now and then I see a hang up of the simulator, without doing any changes to the VHDL files or the flow at all.
How can this behavior be caused by missing files or a bad flow? I mean, simulation is deterministic. I'd expect the same outcome on every run.

0 Kudos
Reply