Confused why ALU implementation will not load on hardware simulator

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

Confused why ALU implementation will not load on hardware simulator

davidtaylor23
I am not too sure what is stopping my ALU implementation from loading onto the hardware simulator. Here is what I have:
   Mux16(a=x, b=false, sel=zx, out=outzx);
   Not16(in=outzx, out=outnotzx);
   Mux16(a=outzx, b=outnotzx, sel=nx, out=outzxnx);
   Mux16(a=y, b=false, sel=zy, out=outzy);
   Not16(in=outzy, out=outnotzy);
   Mux16(a=outzy, b=outnotzy, sel=ny, out=outzyny);
   And16(a=outzyny, b=outzxnx, out=outyandx);
   Add16(a=outzyny, b=outzxnx, out=outyaddx);
   Mux16(a=outyandx, b=outyaddx, sel=f, out=outf);
   Not16(in=outf, out=outnotf);
   Mux16(a=outf, b=outnotf, sel=no, out=out);
   Mux16(a=outf, b=outnotf, sel=no, out=outno);

   Not16(in=outno, out=notoutno);
   CumAnd16(a=notoutno,out=zr);

   And(a=outno[15], b=outno[15], out=ng);

CumAnd16 is just a chip I made to and together 16 bits and that loads fine onto the simulator. Any help would be greatly appreciated ! :)
Reply | Threaded
Open this post in threaded view
|

Re: Confused why ALU implementation will not load on hardware simulator

WBahn
Administrator
What error are you being given?
Reply | Threaded
Open this post in threaded view
|

Re: Confused why ALU implementation will not load on hardware simulator

davidtaylor23
None at all, it won't load onto the simulator. That usually happens if I make a syntax error in the hdl, but I can't seem to spot one here.
Reply | Threaded
Open this post in threaded view
|

Re: Confused why ALU implementation will not load on hardware simulator

WBahn
Administrator
In reply to this post by davidtaylor23
One problem you have is that you are trying to tap off an internal signal (outno[15]). This HDL doesn't support that. You can only tap the chip pins.

So if you wanted to take the least significant bit of the 16-bit output from a Mux you can't do the following:

Mux16(a=x, b=y, sel=x, out=muxout);
Not(in=muxout[0], out=tappedInverted);

You would do it like this:

Mux16(a=x, b=y, sel=x, out=muxout, out[0]=tapped);
Not(in=tapped, out=tappedInverted);

This is described in the Hardware Survival Guide that is linked at the top of the Hardware forum.
Reply | Threaded
Open this post in threaded view
|

Re: Confused why ALU implementation will not load on hardware simulator

WBahn
Administrator
In reply to this post by davidtaylor23
There's usually an error message at the bottom saying why it won't load.
Reply | Threaded
Open this post in threaded view
|

Re: Confused why ALU implementation will not load on hardware simulator

davidtaylor23
In reply to this post by WBahn
Thank you very much! It now loads :)