Problem with my ALU

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

Problem with my ALU

princejones
Hi, I'm having a problem with my ALU. After a bug fixing my chip completely(I had thought) I get an error on my first line of code: Line101, XoutMUX has no source pin.

This is the first line: Mux16(a = x, b = false, sel = zx, out = XoutMux);

I'd appreciate if I could get any help on this,
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Problem with my ALU

cadet1620
Administrator
princejones wrote
Hi, I'm having a problem with my ALU. After a bug fixing my chip completely(I had thought) I get an error on my first line of code: Line101, XoutMUX has no source pin.

This is the first line: Mux16(a = x, b = false, sel = zx, out = XoutMux);

I'd appreciate if I could get any help on this,
Thanks
I don't see anything wrong with this line. Note that the message you quoted has all upper case MUX. If that's not a typo in the post, then you have some part that's using XoutMUX as an input. The line number in the error message may be incorrect.

If you can't find the problem, feel free to email me your HDL.

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: Problem with my ALU

princejones
Would using XoutMUX as an input for another chip cause this problem? Because I thought you can use the output from any chip as an input so long as it wasn't the final "out".

On Feb 3, 2014, at 1:39 PM, "cadet1620 [via Nand2Tetris Questions and Answers Forum]" <[hidden email]> wrote:

princejones wrote
Hi, I'm having a problem with my ALU. After a bug fixing my chip completely(I had thought) I get an error on my first line of code: Line101, XoutMUX has no source pin.

This is the first line: Mux16(a = x, b = false, sel = zx, out = XoutMux);

I'd appreciate if I could get any help on this,
Thanks
I don't see anything wrong with this line. Note that the message you quoted has all upper case MUX. If that's not a typo in the post, then you have some part that's using XoutMUX as an input. The line number in the error message may be incorrect.

If you can't find the problem, feel free to email me your HDL.

--Mark




If you reply to this email, your message will be added to the discussion below:
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Problem-with-my-ALU-tp4027708p4027709.html
To unsubscribe from Problem with my ALU, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Problem with my ALU

cadet1620
Administrator
princejones wrote
Would using XoutMUX as an input for another chip cause this problem? Because I thought you can use the output from any chip as an input so long as it wasn't the final "out".
That is correct, you can have an internal wire connected to multiple inputs.

I suspect that you have a typo in a name or some other syntax error and that the line nummber in the error message is wrong.  Things to try:

Move only the "Mux16(a = x, b = false, sel = zx, out = XoutMux);" line to somewhere later in the file and see if the error line number moves accordingly. (Part line order is irrelevant.)

Rename "xOutMux" in this line only to something that you know isn't used anywhere else and see if the name in the error message changes. (I like to use "foo" for this experiment.)

Rename the other "xOutMux" usages one at a time and see when the error message changes.

Check that you haven't broken your Mux16.hdl if it's in the same directory as your ALU. Rename it to MyMux16.hdl so that the simulator uses the built in Mux16.


You can e-mail me your ALU if you get too frustrated.

--Mark