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
problem with connecting a slice of a struct array to a port #880
Comments
Original Redmine Comment Did some investigation here. The current error comes from V3Width when Verilator try to handle V3AstPin. The issue is Verilator currently only check the if both the port and expression are arrays. In your case, the @DaTa[1:0]@ is actually an ArraySel which is selecting some part from an array. IMHO we should actually check the width match instead of simply comparing the type. Did some other experiments:
It seems to me actually it is kind of safe to disable this error since V3Slice is checking that anyway. |
Original Redmine Comment Width mismatches in V3Width cannot be simply disabled, because V3Width will correct a width mismatch by padding or bit extaction, and so V3Slice will never see it. However disabling it in the specific case that the total widths match but the array depths are different seems reasonable, as then we know V3Slice will get invoked. Would be great to have a patch for that; please include a new test_regress/t style test too. Thanks! |
Original Redmine Comment Here's a patch attempt. Contains a naive fix and a test_regress test. Thanks. |
Original Redmine Comment Thanks for the patch & test. Pushed to git towards 3.869. |
Original Redmine Comment In 3.870. |
Author Name: Varun Koyyalagunta
Original Redmine Issue: 880 from https://www.veripool.org
Original Date: 2015-02-06
Original Assignee: Varun Koyyalagunta
In this example -
verilator --cc
errors with -verilatator --cc +define+NO_SLICE
passes though.I can help contribute a patch if the fix is tractable and someone can point me in the right direction.
The text was updated successfully, but these errors were encountered: