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

Strange memory effect in pure combinational acyclic circuit #762

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

Strange memory effect in pure combinational acyclic circuit #762

veripoolbot opened this issue May 10, 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: 762 from https://www.veripool.org
Original Date: 2014-05-10
Original Assignee: Wilson Snyder (@wsnyder)


Consider the following test case:

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

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

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

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

Most of the code is just there to confuse verilator. The important bit is this line:

Besides other things this connects y[37:34] directly to the input a0.

The test bench sets all input bits to zero, evaluates and prints y[37:34]. Then it sets all input bits to one, re-evaluates and prints y[37:34] again.

One would expect the output 0000 for the first iteration and 1111 for the second iteration. But the output is 0000 in both cases.

If the first iteration is skipped and the inputs are directly set to all-one then the output is 1111 as expected.

The circuit has no memory elements and is acyclic: http://i.imgur.com/K88J0ds.png

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-10T16:41:55Z


Oooo good one. The change detection code had a 64-bit type problem.

BTW UNOPTFLAT warnings don't look at bits, it's something for future improvement.

Fixed in git towards 3.857.

@veripoolbot
Copy link
Contributor Author


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


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