paintchip wrote
Hey guys, I am having a lot of trouble implementing the not16 and and16 gates. However, I think my problem is a syntax one. I am trying to implement the gates by using 16, 1 bit, gates with the syntax; And(a=a[0], b=b[0], out=out[0])..... I have tried several different ways and read Appendix A "buses" a few times, but I still can't get it right. The test scripts keep giving me the failed comparison line. I am getting frustrated with my inability to understand this small part of the HDL language. Can somebody please show me how to properly connect 1 bit from a multibit input to a single bit chip and then send the output to a multibit output? If this is even how I'm supposed to do it :D
You've definitely got the right idea, and your And syntax looks correct. One thing to try is to move your And16 files into a subdirectory by themselves and test them there. That way you'll be testing only your And16 (using the built-in And). If it works in isolation then there must be a problem with your And or Not. (Not likely unless they somehow got changed after they past their tests.)
Look at the output and compare files for the test line that fails and see what bit is failing and take a close look at that bit's And gate. Note that the bit numbers in [] are numbered from right to left.
If you can't find it, send me your HDL and I'll be happy to take a look at it. (Use More|Reply to Author)
--Mark