New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verilator 4.00 multi-threading on OS X #1332
Comments
Original Redmine Comment Thanks for trying this out! I'd really like OSX to work out of the box, so made this high priority. I don't have access to OS X, would you mind suggesting an alternative function to get the CPU number a process is running on? Then replace using that and see if the rest works. With that I can wrap the function in a OS specific ifdef. This may help... https://stackoverflow.com/questions/33745364/sched-getcpu-equivalent-for-os-x |
Original Redmine Comment Thanks for getting back to me. Yes that seems to fix the problem of sched_getcpu:
Furthermore I had problems with randomisation. In particular clang doesn't like the re-entrant version of rand. My (non-semantically identical) workaround (verilated.cc):
That compiles for me. Still I am having some SEGFAULTS on my DPI calls which I probably need to debug further (I enabled --threads-dpi none) so I can't tell you more about the functional state at the moment :(. |
Original Redmine Comment Great, thanks, please check the git change I committed for sched_getcpu is good. I don't understand your proposed VL_RAND. lrand() without the _r is not reentrant, it won't work when multithreaded. |
Original Redmine Comment In git, I updated the random code to use its own algorithm, please try it. |
Original Redmine Comment The random number problem is solved. You forgot to add the macro and the include which is needed on OS X:
Thanks |
Original Redmine Comment Try, try again please. |
Original Redmine Comment Almost:
|
Original Redmine Comment All set then, thanks for your work. |
Author Name: Florian Zaruba (@zarubaf)
Original Redmine Issue: 1332 from https://www.veripool.org
Thanks for your awesome work on Verilator and related tools.
I just wanted to let you know I am running into issues when translating my model with verilator 4.00 and multi-threading enabled. Apparently on OS X
is not available.
Thanks again,
Florian
The text was updated successfully, but these errors were encountered: