-
Notifications
You must be signed in to change notification settings - Fork 34
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
Crash on start_vcd_trace #7
Comments
Thanks for the report. Unfortunately I'm not able to reproduce the bug you've seen (I used python3.7 in ubuntu). Can you try running the tests in I tried running the examples using python3.7 (in the past I only used 3.5 and 3.6), and ran into issues because of the tcl communication being done with gtkwave (I think this was due to running this over SSH). I also ran into an issue with Maybe you can also try taking simple_example.py and remove the three lines related to gtkwave (the call to |
Thank you for the quick reply! As I mentioned, this problem doesn't seem to have anything to do with either sim = pyverilator.PyVerilator.build("top.v")
sim.start_vcd_trace('top.vcd') # <- seg-faults Commenting out the lines with Running
Python versions I tested inlucde : 3.8.2 and 3.7.7 both on Arch linux and macOS. |
Ok I was finally able to test on an Ubuntu 18.04 machine and it works without an issue. |
I took a look in the code for things that could result in a segfault (specifically the python/c interface), and a few things stood out. I fixed all the issues I saw in 4d58d91. Can you try this out to see if you still get the segfault? In the process of trying to reproduce the segfault, I updated verilator to master, and now it looks like some of the tests fail because of it. I'm going to look into what's going on with it. |
Thank you! This indeed solves the crash, and the vcd file is now correctly generated. |
That's good news that the segfault doesn't happen any more. I've made issue #8 for the new failing tests. If you revert back to an older version of verilator, that should be fixed as well. |
On both linux and mac (python 3.7 and 3.8) all examples seg fault. This happens upon calling start_vcd_trace. I was able to trace down the crash to where the init callbacks in
top->trace(tfp,99)
is called in the C code. The crash happens inTop::traceInit
: theuserthis
pointer seems to be corrupt! Unfortunately I was not able to get any further with pinpointing the cause.Verilator version: master
PyVerilator: master
The text was updated successfully, but these errors were encountered: