Re: HDL Syntax for multibit internal pins

Posted by cadet1620 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/HDL-Syntax-for-multibit-internal-pins-tp3277572p3277964.html

Seb wrote
Hi,
Trying to make the And16 after completing the Not16.hdl, I am facing a problem:
It is written in the appendix taht you can't subscript internal pins... so that means that i cant do a:
 "Nand(a=a[x], b=[x], out=tmp[x]);"
so, that's ok but if I do a  "Nand(a=a[y], b=[y], out=tmpY);" instead , i do not see how to use the previously made Not16...
Must I use basic Not 16 times or Is there something i do not understand ?

Thx
Have you made the And chip yet? It's much easier to replicate a single chip than a more complex structure.

I suppose you could could assign all the tempY signals to the individual inputs to your Not16, but that seems like too much typing:
    Not16(in[0]=temp0, in[1]=temp1, ... in[15]=temp15, out=out);

--Mark