Navigation Menu

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

Crash with struct combined with parameters #1099

Closed
veripoolbot opened this issue Oct 26, 2016 · 2 comments
Closed

Crash with struct combined with parameters #1099

veripoolbot opened this issue Oct 26, 2016 · 2 comments
Assignees
Labels
area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Ian Thompson
Original Redmine Issue: 1099 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


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

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-05T12:38:23Z


Thanks for the report, yes this is illegal.

Message fixed in git towards 3.889.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-11-25T16:02:43Z


In 3.890.

@veripoolbot veripoolbot added area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants