-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 (First off, this thread started with a tyop. non-blocking should be blocking.)
John Sanguinetti wrote: | Steve, | | I ran the two tests on ncsim (!) and got the same result you got with | Icarus. Looking at the two models, I'm not sure what the point of | nblkpush is. Those are not non-blocking assignments, they are continuous | assignments, and the situation that is set up is quite clearly a race | condition. VCS would behave the same as ncsim (at least it did when I | wrote that part of the code). There is no earthly justification for it | to work the way this test expects it to. Right, I think. The blocking assignment I'm referring to is not the continuous assigns: ~ wire ab = a & b; ~ wire abc = ab | c; ~ wire abcd = abc & d; But the blocking assignments to the inputs of those expressions. This test probably made its way into the test suite based on a report from a confused user who assigned a value to a continuous assign expression input and read an "unexpected" output from the expression. The "push" in the name is from the idea that a write into a continuous assign expression might be "pushed" through the expression to the output before the thread doing the assignment is allowed to continue. That IS consistent with the mental image of a blocking assign being immediate, exactly the opposite of a non-blocking assignment. Or that is an unsub- stantiated but not too unreasonable line of reasoning. There isn't really a rule like that. And what's interesting, that test PASSED Verilog XL. Then again, XL is the only simulator that passed that test. The sched2 test has a very similar race in it, except it expects the thread to win instead of the continuous assignment. It is the opposite of the nblkpush. Icarus Verilog, ncsim and ModelSim all PASS this test and fail the nblkpush test. Interestingly, VCS fails *both* tests. Depending on who pays your salary, you might say with VCS that the race is always lost or always won:-) So I'm going to choose lazy evaluation of the continuous assigns, which cases sched2 to PASS and nblkpush to fail, on the off chance that I can detect and filter simulation runt events and marginally improve performance. | John | | | On Jun 26, 2005, at 10:29 AM, Stephen Williams wrote: | | | I'm doing some reworking on the Icarus Verilog scheduler, and ran | into a pair of tests in the ivtest suite that seem to contradict | each other. Therefore, I would like people with access to the tools | to try out the attached two sample programs on a variety of tools. | | The attached programs try to test how the non-blocking assignment | assignments are scheduled through a netlist. I believe that sched2 | should pass and nblkpush should fail, but it would be best to take | a vote amongst all the existing tools. | | For the record, sched2 passes and nblkpush fails Icarus Verilog 0.8. | | Thanks, | -- | Steve Williams "The woods are lovely, dark and deep. | steve at icarus.com But I have promises to keep, | http://www.icarus.com and lines to code before I sleep, | http://www.picturel.com And lines to code before I sleep." |> <nblkpush.v> <sched2.v> - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCwKcjrPt1Sc2b3ikRAnp2AKDeTh9qIEGP+b84mLHeGBfDwz9nwQCg0oB3 cUpf7Xk1lElUu/z4X9ZN1bE= =LhCc -----END PGP SIGNATURE-----