Not gates returning fixed values.

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

Not gates returning fixed values.

Richard Philip Witt
For better or for worse, I'm using two Not gates in my DMux4Way.hdl chip.
I call them so:

    Not(in=sel[0], out=NSel0);
    Not(in=sel[1], out=NSel1);


The weird thing is, when I run the chip. The Not gates both return 1 regardless of the value sel[0] or sel[1].
I've tried the same notation in another chip implementation and it works just fine.

Cluelessly,
Philip.
Reply | Threaded
Open this post in threaded view
|

Re: Not gates returning fixed values.

cadet1620
Administrator
Richard Philip Witt wrote
For better or for worse, I'm using two Not gates in my DMux4Way.hdl chip.
I call them so:

    Not(in=sel[0], out=NSel0);
    Not(in=sel[1], out=NSel1);


The weird thing is, when I run the chip. The Not gates both return 1 regardless of the value sel[0] or sel[1].
I've tried the same notation in another chip implementation and it works just fine.

Cluelessly,
Philip.
This usually happens when there is an error in one of the chips that is being used by the chip that's failing. In this case, there is likely a problem with your Not.

You can test your DMux4Way (or any chip) in isolation by creating a subdirectory under projects\01 and copying only the .hdl, .tst and .cmp files into the directory.  This way you guarantee that all other chips are using the built-in implementations.

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

Re: Not gates returning fixed values.

phillustine
Thanks for the post. I went on to build the chip with DMux's instead. I haven't taken the time to completely troubleshoot the implementation to which my initial post pertains, but I did notice an error in my outputs. Instead of implementing four outputs (a, b, c & d) I had implemented a single (out) output. Why this manifested itself in my Not gates I am not entirely sure.

Thanks for the tip on separating out the chips to make use of the built-in circuits, mind. Keep up the good work.