-
Notifications
You must be signed in to change notification settings - Fork 24
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
segfault when using prototype components. #981
Comments
@mbstrange2, Ill take a look |
Can you try running pytest with the "-s" flag to see if there's a CoreIR error message being dumped? |
@leonardt I haven't been using pytest, just normal python, so I believe whatever output should be there, right? |
This is the output I get when running the test:
Looks like some issue related to placement? |
Runnning |
@leonardt Sorry about that, you need updated cyclone, thunder, and canal, then
|
Ok, I had to manually install the latest master branch from the cgra_pnr repo. I'm able to run the test and get verilog generated
Perhaps there's some difference in our setup still. Can you show the pycoreir version and check if there's multiple version of coreir in your path with
and
here's what I have
|
Can you make sure to target xcelium? I'm not sure if there's any difference if you choose a different simulator target.
|
The verilator compilation failed with a huge amount of errors, here's a snippet:
I wonder if the large amount of errors is causing a segfault in the downstream tool? I'll try using xcelium to see if there's any difference |
Can you check |
skip_compile is False in conftest I was looking at the test code and noticed:
I think it should be
Since you need to use the |
There must be some other mismatch in our envs. This worked for me when using old generated verilog and ran fine in xcelium. |
Also, I don't think changing the simulator target (to xcelium) would affect the verilog code generation. If you can't generate code with |
I can generate the verilog with |
Ah, I see, I misread the original post then, let me investigate with the xcelium target then |
Changing the target doesn't seem to affect verilog code generation for me (I get a file in mek_dump, Interconnect.V), so I think there's still some difference in our environments |
Okay this is somewhat great news then. The test ran and passed? Here's my pip list
|
I'm able to generate verilog and the test runs xrun but then fails with some errors. Here are the relevant *E snippets from xrun.log
|
But it does not segfault at any point |
You're having it use cadence ware (CW)? Those errors are in the PE so I'm even more confused. |
I haven't changed anything, looking at the generated code though, it looks out of date so possibly some different coreir version is being used |
Ah yes, my version of python on kiwi is old (3.7) so it's installing an older version of coreir, going to upgrade it to 3.8 |
Hmm that wasn't the problem, it actually seemed to be the right version of coreir and still getting the same output |
Thanks for looking into this, I can help later today if this is still not resolved. |
Hmmm not sure what to do then. |
When looking at the generated |
Ok, figured it out. There was a leftover old version of coreir in my LD_LIBRARY_PATH, you may want to check that out (maybe there's an old version of the library being used). This was causing the old float code library to be loaded and affecting the verilog output). Now I just get this error from the global buffer:
I'm going to try patching it locally to see if the test will run |
Okay, I resolved the global_buffer_int problem, it looks like the test bench was copying the entire contents of genesis_verif directory. It turns out that directory had some old genesis files from an older version of garnet that was being copied in and causing the error. Purging the directory resolved that issue (now I'm getting the xcelium license issue so I'm trying again with the older version that works) |
Ok so the simulation completes but then fails during the results parsing with:
But I think I'm much further then necessary. It looks like I'm able to generate the verilog and run the test totally fine without a segfault so let's see what's different about your environment. Can you post the output of your $PATH and $LD_LIBRARY_PATH? Let's make sure there's no old versions of coreir lying around there. Also, is your coreir version installed via pip? Or do you have a local installation from a checkout of the pycoreir repo? |
Ah, I see that you have coreir installed from a local location: Can we double check this setup by either recompiling it to ensure it's up to date or uninstalling this version and using the pip distribution? |
This is in the aha docker - if you want to attach to it |
|
Hmm wait, nevermind, hitting ctrl-c dropped me into the shell, maybe it was just waiting for a command |
You just need to hit enter - it doesn't automatically show the prompt for some reason lol |
Hm the tests seem to be running for me, it seems to be running more than one though so I have finished all of them |
Have you tried simply reattaching to the container? Perhaps there's some leftover config in your env causing the problem? How many tests is this supposed to run? I'm still waiting for it to finish but it seems to be running xcelium multiple times so it doesn't seem to be having any problems generating the verilog. |
Oh I'm sorry one second |
Okay if you run it again in the docker it will segfault |
Seemed to have "worked around" the issue by uninstalling coreir, and installing the pypi distribution. So something about the local docker setup is likely at fault
|
I reinstalled coreir and it causes the segfault so something about the local build is causing the problem |
Hmm, I tried reverting coreir to an older commit to match up with the pycoreir release (which is a few commits behind coreir master) but still the same problem, which suggests it's not an issue with any of the recent changes (also reviewing the commits shows nothing that would suggest a seg fault, they are minor) |
@mbstrange2 does that workaround work for unblocking you for now? We'll need to investigate the docker environment more closely to see what would be causing this issue with the local build versus using the pip wheel distribution |
Where is the docker environment specified? |
@leonardt This workaround is good for me at present @rdaly525 https://hub.docker.com/r/stanfordaha/garnet it's this docker - it should be created from https://github.com/StanfordAHA/aha |
I am experiencing an issue where any attempts to generate a Verilog for my test bench is segfaulting.
This error can be reproduced by checking out
lake:sparse_strawman
andgarnet:spVspV
and runningpython tests/test_memory_core/test_memory_core.py
ingarnet
.This is the output I see when trying to generate the verilog in this context.
The text was updated successfully, but these errors were encountered: