Login  Register

Re: Problem with zr and ng

Posted by cadet1620 on Aug 16, 2011; 7:39pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Problem-with-zr-and-ng-tp2647722p3259660.html

jsank wrote
i'm a little confused b/c it seems that in another part of the forum, the solution using [] is correct:

the thread at the link below seems to say that the solution further below is correct (and roughly matches what i came up with) but the HDL throws the 'sub bus of internal node may not be used' error
The quoted snippet of HDL is invalid unless outValue is an INPUT or OUTPUT of the chip being defined.  It is a limitation of the hardware simulator that sub-busing can only be done on inputs and outputs of chips.
    Not(in=in[3], ...);   is sub-busing the in bus of the chip being defined,
    Not16(out[4..6]=threeBits, ...);   is sub-busing Not16's output.
also, physically, i don't understand why 8 pins of a 16 bit bus couldn't be connected to an Or8Way chip while the other 8 pins are connected to another Or8Way chip but i'm sure i'm totally missing something.
No physical reason, just a programming limitation in the Hardware Simulator.

--Mark