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

Incorrect results with XNOR/shift expression #776

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

Incorrect results with XNOR/shift expression #776

veripoolbot opened this issue May 25, 2014 · 2 comments

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented May 25, 2014


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


This should always return y=4'b1111, but Verilator f705f9b only does this for a=0:

 module issue_053(a, y);
   input [3:0] a;
   output [3:0] y;
   assign y = (a >> a) ^~ (a >> a);
 endmodule

Self-contained test case:

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

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

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

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented May 26, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-26T22:19:15Z


Fixed in git towards 3.861.

There is a specific optimization for "(a>>b) op (c>>b)" -> "(a op c)>>b" which shouldn't have been applied to an XNOR.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Jun 11, 2014


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


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
You can’t perform that action at this time.