Can somebody run my ALU hdl for me?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can somebody run my ALU hdl for me?

HighSchoolerWhoAsksHowTooMuch
I cannot figure out what is wrong with my ALU.hdl (see previous post for more info). I even used the "solution" from the internet as well as a alu.test file from the internet and still got the same comparison error on line 1. I think that the problem may be with my simulator.

Could somebody run the code for me and tell me if there is an error? Thank you!

    Mux16(a=x[0..15],b[0..15]=false,sel=zx,out=x1);
    Not16(in=x1,out=maybex);
    Mux16(a=x1,b=maybex,sel=nx,out=x2);

    Mux16(a=y[0..15],b[0..15]=false,sel=zy,out=y1);
    Not16(in=y1,out=maybey);
    Mux16(a=y1,b=maybey,sel=ny,out=y2);

    And16(a=x2,b=y2,out=output1);
    Add16(a=x2,b=y2,out=output2);
    Mux16(a=output1,b=output2,sel=f,out=output3);

    Not16(in=output3,out=almost);

    Mux16(a=output3,b=almost,sel=no,out=out);

    Mux16(a=output3,b=almost,sel=no,out[15]=pt2);
    Mux16(a=output3,b=almost,sel=no,out=pt3);

   
    And(a=pt2,b=true,out=ngtest);
    Add16(a=pt3,b[0..15]=true,out[15]=pinname);
    Mux(a=pinname,b=false,sel=ngtest,out=zr);
    And(a=pt2,b=true,out=ng);
Reply | Threaded
Open this post in threaded view
|

Re: Can somebody run my ALU hdl for me?

HighSchoolerWhoAsksHowTooMuch
Never mind, I found the error. I was not calculating zr correctly. I had to run it on a friend's computer for it to work.