I'm trying to implement the Mux chip. On paper my implementation seemed to work fine, but it kept failing during the comparaison. I tracked the error down to a Xor chip that isn't working as it should. (see screenshot, the Xor chip is just passing input "a" to the output!). The Xor chip works fine in my DMux implementation. But just to be sure, I've removed my Xor implementation from the working directory and am using the built in Xor chip, but the same thing happens!
I've been playing around with this for 2 days now, any ideas?
Added a dummy Not gate, the exact same problem occurs.
I then removed the dummy Not gate, uncommented the 3 other gates from my code, and changed "out=out" to "out=c0" in the first And gate (ie. changed the code back to the entire implementation). Ran the test script, adding output for c0, c1, c2, and c3. This is the result:
Something really wonky appears to be going on, none of the first 3 gates in the code seem to be working at all? The Xor gate is acting differently than from before as well...
The HDL in this screen shot works for me. It even passes the Mux test! There must be a problem in one of the underlying chips.
Create a subdirectory and copy only Mux.hdl, Mux.tst and Mux.cmp into it.
Run the test, it should work.
Copy And, Or and Xor HDL files in one at a time running the test to determine which one is causing the problem. (I suggest that order since your Xor likely uses Or which may use And.)
If the test is still passing with after bringing in those HDL files, the problem must be in one of the HDL files they use.