Please help me to find where is wrong

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

Please help me to find where is wrong

vivivo
This post was updated on .
  I have spent several hours to find where the code wrong, I failed. I don't know how to find it,so i come here for help, forgive my poor English.Thanks!


Reply | Threaded
Open this post in threaded view
|

Re: Please help me to find where is wrong

ybakos
First, you can simplify some of your syntax. Instead of:

a[0..15] just use a. Since x is 16-bit, and the Mux16's a is 16-bits, you can just say a=x. Example:
Mux16(a=x, b=false, sel=zx, out=x1);

You also misspelled false. (flase).

I also believe the pins 1out, 0out, etc should be corrected to out1, and out0. Don't start the pin names with a number. (I could be wrong about this.)

You might have some flaws in the design. I strongly recommend drawing the ALU on paper first, to work out your design. It's fun!
Reply | Threaded
Open this post in threaded view
|

Re: Please help me to find where is wrong

cadet1620
Administrator
In reply to this post by vivivo
Your solution is logically correct.

After fixing the syntax problems ybakos mentioned, please edit your post to remove the HDL. We want students to develop their own solutions.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Please help me to find where is wrong

vivivo
In reply to this post by ybakos
Thank you so much for such useful advise ,I appreciate for reply so fast and serious attitude.Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Please help me to find where is wrong

vivivo
In reply to this post by cadet1620
I'm sorry,the post have been edited now,thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Please help me to find where is wrong

cadet1620
Administrator
No need to apologize, it is OK to post code to get help. I just remind posters to edit their posts after their problem is solved.

Welcome to Nand2Tetris. I hope you enjoy the course!

--Mark