Multi-threaded verilated simulation on single-core
I found an issue and before I dig deeper into it and try to solve it, I was wondering if you observed the issue before or if I am missing anything:
I am building a verilated simulation on my machine and distribute it to my students. Some students asked me whether it is normal nothing happens after 20 minutes, while it terminates for me after ~30 sec. After a few students encountered this issue I saw that they all had this warning about that they are running on a single core (all inside a virtual machine) and increasing the number of cores of the virtual machine removed the warning and resolved the issue. So, it seems there is some kind of deadlock.
I can provide more useful information once the summer break approaches.. The code I am running is the Ariane CPU: https://github.com/pulp-platform/ariane
#1 Updated by Wilson Snyder about 2 months ago
- Status changed from New to Resolved
Yes, there was a missing yield, so should be much better. Fixed in git towards 4.016.
Is there a reason why you're building multithreaded and running single core, or just accidental? It should always be faster to run a non-multithreaded model on one CPU (in the 2x slowdown range, not the 40x range you saw).
#2 Updated by Stefan Wallentowitz about 2 months ago
Thanks, Wilson! I will try asap.
It seems to me that it is deadlocked or livelocked somehow, it did not terminate in 20 minutes but I told them to kill it after that time.
Yeah, accidental, I am giving a couple of CPU cores pre-compiled with Verilator in my CA lab, along with a Linux VM that they use. But most of them kept the number of cores for the VM unchanged, while I compile locally..
Also available in: Atom