-
Notifications
You must be signed in to change notification settings - Fork 308
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 running firtool 1.60.0, standalone example included #6557
Comments
Same crash with:
|
Without |
I was able to reproduce in the debugger on current main (3ce5c8c). Looks like a null reference in |
I can trigger the same error with the following MLIR: hw.module @hi(in %arg0: !hw.array<2xi8>, in %sel: i1, out a: i8) {
%0 = hw.array_get %arg0[%sel] : !hw.array<2xi8>, i1
hw.output %0 : i8
} $ firtool --format=mlir --verilog --lowering-options=disallowPackedArrays hi.mlir I'm fairly certain this is representative of the original case. The fix should be to lower packed array module inputs into individual inputs for each array element, and fix up module instantiations accordingly (similar treatment for outputs would also fix this test case). This is a bit more involved than the work I did previously on this code, so I wouldn't consider it a "quick fix" (for me at least), but doable in a couple days, I think. I am not currently working on this and I don't plan to at this time. |
We can avoid the failure by just calling
I agree we can flatten IO in LegalizeModules but it would be very complicated to do that in that pass. I think extending |
untar firtool-crash.tar.gz
Run:
Output:
The text was updated successfully, but these errors were encountered: