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

Icarus does undef propagation of const adds incorrectly #15

Closed
cliffordwolf opened this issue Feb 20, 2014 · 2 comments
Closed

Icarus does undef propagation of const adds incorrectly #15

cliffordwolf opened this issue Feb 20, 2014 · 2 comments

Comments

@cliffordwolf
Copy link
Contributor

@cliffordwolf cliffordwolf commented Feb 20, 2014

The following module should set both outputs to constant 4'bxxx:

module test(a, y1, y2);
  input [1:0] a;
  output [3:0] y1, y2;
  assign y1 = 4'bxx00 + 2'b00;
  assign y2 = 4'bxx00 + a;
endmodule

But Icarus Verilog (git 5a06602) does only the case involving a variable
correctly. In the constant case it is too smart and outputs 4'bxx00 instead.

@martinwhitaker
Copy link
Collaborator

@martinwhitaker martinwhitaker commented Feb 23, 2014

Yes, what the verinum class add/subtract operators do is entirely sensible, but is not what the Verilog LRM specifies. I'm currently working on the verinum arithmetic operators to fix the result width issue, so will fix this issue as well.

@martinwhitaker
Copy link
Collaborator

@martinwhitaker martinwhitaker commented Feb 25, 2014

I've pushed a fix for this to the git master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants