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 extends ~|a and ~(|a) wrong with -Wno-WIDTH #736

Closed
veripoolbot opened this issue Apr 9, 2014 · 2 comments
Closed

Verilator extends ~|a and ~(|a) wrong with -Wno-WIDTH #736

veripoolbot opened this issue Apr 9, 2014 · 2 comments
Assignees
Labels
area: wrong runtime result resolution: fixed

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented Apr 9, 2014


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


The following module should return 4'b0000 or 4'b0001 but Verilator
GIT fb4928b returns 4'b1111 or 4'b1110 instead.

module issue_034(a, y);
  input [3:0] a;
  output [3:0] y;
  assign y = ~|a;
endmodule

Note: The "|" in "|a" is the nor reduction operator. This is different
from "~(|a)".

Crosscheck: Vivado 2013.4, XST 14.7, Quartus 13.1, Xsim 2013.4 and Modelsim
10.1d implement this correctly.

Self-contained test case:

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

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

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

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Apr 9, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-04-09T11:59:26Z


Again related to ignoring WIDTH warnings. Same problem with reduction-and.

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:09:31Z


In 3.860.

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

No branches or pull requests

2 participants