Skip to content
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

Improve error report when erroneously using interface in expression #1525

Closed
veripoolbot opened this issue Sep 25, 2019 · 2 comments
Closed

Improve error report when erroneously using interface in expression #1525

veripoolbot opened this issue Sep 25, 2019 · 2 comments
Assignees

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Sep 25, 2019


Author Name: Bogdan Vukobratovic (@bogdanvuk)
Original Redmine Issue: 1525 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


When an interface ("din" in this example) is erroneously used in an expression like this:

assign dummy = din.data & din;

Verilator reports the following:

%Error: Internal Error: top.sv:15: ../V3Gate.cpp:440: Var didn't get varscoped in V3Scope.cpp
                                  : ... In instance wrap_dut.din__Viftop
    assign dummy = din.data & din;
                              ^~~
                         ... See the manual and http://www.veripool.org/verilator for more assistance.

Maybe a more informative error can be returned.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Sep 26, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-09-26T01:54:08Z


Thanks for your issue. I was unable to get the exact error message you did, but got other ugly messages when misusing an interface, so please check this also fixes your case.

Fixed in git towards eventual 4.020 release.

Here's what it does now:

 %Error: t/t_interface_asvar_bad.v:29: Operator ADD expected non-interface on RHS but 'itf' is an interface.
                                     : ... In instance t.source
       getter = 4'd3 + itf;
                       ^~~
@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Oct 6, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-10-06T14:07:52Z


In 4.020. Thanks for reporting this; if there are additional related problems, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.