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

Yet another Verilator shift bug #763

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

Yet another Verilator shift bug #763

veripoolbot opened this issue May 10, 2014 · 2 comments
Assignees
Labels
area: lint resolution: fixed

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented May 10, 2014


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


This should effectively be y=0, but verilator 1f56312 evaluates y=a instead.

  input [2:0] a;
  output [3:0] y;
  assign y = (a >> 2'b11) >> 1;
endmodule

Self-contained test case:

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

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

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

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented May 10, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-10T20:38:28Z


Bad optimization, it thought this was same as (a >> (2'b11 + 2'b1)).

Fixed in git towards 3.857.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented May 11, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-11T21:07:37Z


In 3.860.

@veripoolbot veripoolbot added area: lint resolution: 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 resolution: fixed
Projects
None yet
Development

No branches or pull requests

2 participants