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
Don't crash when attempting to dot index into an interface array #978
Comments
Original Redmine Comment Thanks, the logical part of the patch makes sense but the test case needs to pass to commit. V4$ test_regress/t/t_array_interface.pl --vlt |
Original Redmine Comment Hm, sounds like I messed up my push, that should have been fixed already. Give me a few minutes to clean that up. |
Original Redmine Comment https://github.com/phb/verilator-asserts/tree/ifacerefdtype -- seems I had a typo in the branch name for the first push that contained the testcase bug) |
Original Redmine Comment Great! Pushed to git towards 3.877. |
Original Redmine Comment Unfortunately I've come to realize that this patch is actually fundamentally broken. Sorry for the inconvenience, but can you please back out the change? (Couple of issues with the patch, fundamentally it's doing this at the wrong stage, the constant values has not been calculated yet and alas it was just a pure coincidence that the tests passed.) |
Original Redmine Comment Ok, thanks for the notice. I backed it out, but kept the test with it marked as broken - remove the one line in the test's .pl file when fixing it please. |
Original Redmine Comment Wilson, This turned out to be a lot harder then I initially expected. I'm sort of happy with my latest attempt, however, there are two potential deal breakers. https://github.com/phb/verilator-dev/tree/#� I've expanded the test in question to try and ensure that this is actually working as expected. All prior tests are also passing with this version. |
Original Redmine Comment
|
Original Redmine Comment Thanks for the quick feedback. I've spent some time trying to change the V3Inst code to create an AstVarXRef instead without much luck. The stages following V3Inst seems to be pretty strict about the Pin being connected to an AstVarRef. There is a function/stage pinReconnectSimple which I don't quite understand yet -- however, it seems to wrap a pin expression in a temporary Var to ensure the Pin is only directly connected to an AstVarRef. Is that the code you had in mind that would deal with the AstVarXRef ? |
Original Redmine Comment Got it working. I'll clean up the changes and send a new patch later tonight. |
Original Redmine Comment rebased, updated version here: https://github.com/phb/verilator-dev/tree/#� |
Original Redmine Comment Thanks, pushed to git towards 3.878. |
Original Redmine Comment In 3.878. |
Author Name: Johan Bjork
Original Redmine Issue: 978 from https://www.veripool.org
Original Date: 2015-10-03
Original Assignee: Johan Bjork
Verilator crashes with an internal error when trying to index with a constant into an interface. See #� for more details on the simple (and the more complicated case). This patch fixes the internal error for the simple case where you use a constant index into an interface array.
This does not attempt to address either #� or the array'ed interfaces issue in 879.
Previously the testcase would fail with:
Patch can be accessed at https://github.com/phb/verilator-asserts/tree/ifracerefdtype
The text was updated successfully, but these errors were encountered: