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

Verilator bug in sign extending special boolean expression #768

Closed
veripoolbot opened this issue May 15, 2014 · 2 comments
Closed

Verilator bug in sign extending special boolean expression #768

veripoolbot opened this issue May 15, 2014 · 2 comments

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented May 15, 2014


Author Name: Clifford Wolf (@cliffordwolf)
Original Redmine Issue: 768 from https://www.veripool.org
Original Date: 2014-05-15
Original Assignee: Wilson Snyder (@wsnyder)


This should set y=4'b1111 but Verilator d7e4bc1 sets y=4'b0001 instead.

  input signed [3:0] a;
  output [3:0] y;
  assign y = $signed(5'd1 > a-a);
endmodule

Only slight modifications in the expression make the problem disappear.

Self-contained test case:

http://svn.clifford.at/handicraft/2014/verilatortest/test015.v

http://svn.clifford.at/handicraft/2014/verilatortest/test015.cc

http://svn.clifford.at/handicraft/2014/verilatortest/test015.sh

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented May 16, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-16T11:11:49Z


Fixed in git towards 3.862.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Jun 11, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-06-11T00:57:43Z


In 3.862.

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