Re: Mux4way16 problem

Posted by WBahn on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Mux4way16-problem-tp4035690p4035711.html

Idrisadeniyi wrote
I have corrected the sel's bit, but I'm still having problem with it. In fact, the output now took me back to No. 11 on the output. This is exhausting. May be whole thing is not just right. The following is my hdl.
       
        Mux4Way16 (a=a, b=b, c=c, d=d, sel[0..0]=sel[0..0], out=w);
        Mux4Way16 (a=e, b=f, c=g, d=h, sel[0..0]=sel[0..0], out=x);
        Mux4Way16 (a=a, b=b, c=c, d=d, sel[1..1]=sel[1..1], out=y);
        Mux4Way16 (a=e, b=f, c=g, d=h, sel[1..1]=sel[1..1], out=z);
        Mux4Way16 (a=w, b=x, c=y, d=z, sel[0..1]=sel[0..1], out=out);
Again, the 'sel' input on the Mux4Way16 is a TWO BIT signal. You need to drive it with a TWO BIT signal.

sel[0..0] and sel[1..1] are both ONE BIT signals. They are the same as just sel[0] and sel[1], respectively.