|
From: Stephen W. <st...@ic...> - 2008-04-21 21:47:49
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: | --- On Mon, 4/21/08, Stephen Williams <st...@ic...> wrote: | |> WRT xnor_test: Can you instrument the of_XNOR function in |> vthread.cc |> and try it? Something like this: |> |> vvp_bit4_t lb = thr_get_bit(thr, idx1); |> vvp_bit4_t rb = thr_get_bit(thr, idx2); |> cerr << "XXXX XNOR: lb=" << lb |> << " rb=" << rb |> << " lb^rb=" << (lb ^ rb) << |> " ~(lb^rb)=" << ~(lb ^ rb) |> ~ << endl; |> |> ... inside the "for" loop of the of_XNOR |> function. None of the |> bits in the result should turn into X or Z. If the %xnor |> instruction |> generates X results, then the loop in xnor_test.v may go |> infinite. | | The part of the test that is going into an infinite loop is the "different sized operands (equality)" section. | | The small1 value is set to zero initial then increments to one, but never goes past that. It appears that the sixteen bit xnor value is calculated correctly. Both the vthread code and a straight print of large2 shows all bits are set to one. I think we are looking for some sort of uninitialized memory problem. It appears that the %xnor opcode is fine in your case, but there is some problem managing the index variable. Try putting a test print in the of_ADDI function to look at the first word of the lva array that is returned by the vector_to_array before and after the "for" loop that does the addition. At the very least, this will confirm that the index variable value is stuck. Perhaps the %set/v or %load/v (if not the %addi) are not working properly? Seeing what's going into/out of the %addi may help us pin it down. - -- 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 v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIDQuGrPt1Sc2b3ikRAhrcAJ4+1AS7MxQJvTrLva3wVr1VYT3cjACdHN2n gKE2LNz9v95MUcg3a62FVFg= =QPcr -----END PGP SIGNATURE----- |