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

using enum constant as an index causes internal error #339

Closed
veripoolbot opened this issue Apr 13, 2011 · 2 comments
Closed

using enum constant as an index causes internal error #339

veripoolbot opened this issue Apr 13, 2011 · 2 comments
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Alex Solomatnikov
Original Redmine Issue: 339 from https://www.veripool.org
Original Date: 2011-04-13
Original Assignee: Wilson Snyder (@wsnyder)


Verilog code:

typedef enum logic [1:0] {
BIT0 = 2'd0,
BIT1 = 2'd1,
BIT2 = 2'd2
} bit_t;

module test (
);

logic [2:0] vector;
logic bit0;
logic bit1;
logic bit2;

assign bit0 = vector[BIT0];
assign bit1 = vector[BIT1];
assign bit2 = vector[BIT2];

endmodule // test

Verilator output:

verilator --cc test.v
%Error: Internal Error: test.v:15: ../V3Width.cpp:664: EnumItem not under a Enum
%Error: Internal Error: See the manual and http://www.veripool.org/verilator for more assistance.
%Error: Command Failed verilator_bin --cc test.v

Modelsim compiles without problem.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-04-13T23:35:18Z


Thanks for the good test; fixed in git for 3.813.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-06-29T00:57:23Z


In 3.813.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants