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 signdness of {single} #759

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

Verilator bug in signdness of {single} #759

veripoolbot opened this issue May 3, 2014 · 2 comments
Assignees
Labels
area: wrong runtime result Issue involves an incorrect runtine result from Verilated model resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


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


Verilator a985a1f returns 11001 instead of 01001, i.e. verilator
performs sign extension even though the result of { .. } is unsigned.

     output [4:0] y;
     assign y = { -4'sd7 };
endmodule

Self-contained test case:

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

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

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

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-04T00:20:38Z


Good one. It worked with multiple concat arguments, but with just one term "{x}" was optimizing it away before it determined the sizes didn't change. Wouldn't be surprising if no one ever had a concat without multiple arguments and a signed size mismatch.

@veripoolbot
Copy link
Contributor Author


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


In 3.860.

@veripoolbot veripoolbot added area: wrong runtime result Issue involves an incorrect runtine result from Verilated model resolution: fixed Closed; 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 Issue involves an incorrect runtine result from Verilated model resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants