Or8Way .tst Problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Or8Way .tst Problem

JJE888
My solution is as follows:

CHIP Or8Way {
    IN in[8];
    OUT out;

    PARTS:
    Or(a=in[0], b=in[1], out=out1);
    [CONTINUED FOR ALL ITEMS IN ARRAY]
}

When I run the .tst script, the comparison fails.  Specifically, for test value 1111111 the output of the first "OR" is:

a in[0] 0000000000000001
b in[1] 0000000000000001
out out1 0000000000000000

I also tested the underlying "OR" chip and that works fine.

I'd appreciate any suggestions as to what I am doing wrong.

Reply | Threaded
Open this post in threaded view
|

Re: Or8Way .tst Problem

ybakos
You've got to be close. Think of a "fork" shape, and keep trying. Post back if you're still stuck.
Reply | Threaded
Open this post in threaded view
|

Re: Or8Way .tst Problem

JJE888
This post was updated on .
In reply to this post by JJE888
Thanks for your quick response.  Sadly, I am still stuck.

So far, I've tried both:

    Or(a=in[0], b=in[1], out=out1);
    [....]

    Or(a=in[0], b=in[1], out=out1);
    [....]

In each case, when I run the .tst script, the comparison fails at the test value 1111111.  In particular, the individual "OR" chip fails; when I look at the Part Pins screen it shows a = in[0] = 1, b = in[1] = 1, out = out1 = 0.

Thanks again for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Or8Way .tst Problem

cadet1620
Administrator
You need to have something connected to the 'out' pin of the Or8Way.


--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Or8Way .tst Problem

JJE888
Oops!  Duh - thank you for pointing that out.  How embarrassing....