Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1099

Crash with struct combined with parameters

Added by Ian Thompson 5 months ago. Updated 4 months ago.

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

0%


Description

Verilator crashes when compiling a child module which accesses a struct signal in a parent module, that parent module takes a parameter, and the parameter is set to a non-default value. I'm not sure whether this is legal Verilog in the first place (I came across it as a bug inside a larger project), but it would be nice to at least get a clean error message, rather than a crash.

Example RTL:
typedef struct packed {
  logic foo;
} some_struct_t;

module child ();
  logic a;
  assign a = bar.foo;
  // note that "foo" can be replaced with any string,
  // and the same error occurs
endmodule

module parent 
#(
  parameter some_param = 0
)
(
);
  some_struct_t bar;
  child c ();
endmodule

module top ();
  // The parameter must be anything other than the default
  parent #( 1 ) p ();
endmodule
Output:
 $ verilator --cc --top-module top struct_bug.v
%Error: Verilator internal fault, sorry.  Consider trying --debug --gdbbt
%Error: Command Failed /usr/local/bin/verilator_bin --cc --top-module top struct_bug.v

History

#1 Updated by Wilson Snyder 5 months ago

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

Thanks for the report, yes this is illegal.

Message fixed in git towards 3.889.

#2 Updated by Wilson Snyder 4 months ago

  • Status changed from Resolved to Closed

In 3.890.

Also available in: Atom