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 partially out-of-bounds part select #823

Closed
veripoolbot opened this issue Sep 23, 2014 · 2 comments
Closed

Incorrect results with partially out-of-bounds part select #823

veripoolbot opened this issue Sep 23, 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: 823 from https://www.veripool.org
Original Date: 2014-09-23
Original Assignee: Wilson Snyder (@wsnyder)


This should return y=4'b100x for a=1, but verilator returns y=0 instead
(the MSB should be '1', obviously we don't care about the 'x' in the LSB that
is the result of the (by one bit) out-of-bounds part select):

 module issue_057(a, y);
   input [2:0] a;
   output [3:0] y;
   localparam [5:15] p = 51681708;
   assign y = p[15 + a -: 5];
 endmodule

Self-contained test case:

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

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

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

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

This is with git e8edbad (verilator_3_864).

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-11-09T23:39:21Z


Fixed in git towards 3.865.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-11-15T13:46:21Z


In 3.866.

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