Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

Issue #1525

Improve error report when erroneously using interface in expression

Added by Bogdan Vukobratovic 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Lint
% Done:

0%


Description

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.

top.sv (215 Bytes) Bogdan Vukobratovic, 09/25/2019 07:01 AM

script.sh View (21 Bytes) Bogdan Vukobratovic, 09/25/2019 07:01 AM

History

#1 Updated by Wilson Snyder 3 months ago

  • Category set to Lint
  • Status changed from New to Resolved
  • Assignee set to Wilson Snyder

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;
                      ^~~

#2 Updated by Wilson Snyder 2 months ago

  • Status changed from Resolved to Closed

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

Also available in: Atom