Chip name doesn't match

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

Chip name doesn't match

Emanuel Amit
For some reason every time i try to load a chip into the hardware simulator it tries to load the same xor chip and then the message is that the chip name doesn't match because i'm not trying to load an xor chip.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

cadet1620
Administrator
Does the chip that you are trying to load use Xor in it's PARTS section?

If so, the error message is being generated when the simulator tries to load the Xor.hdl for that chip.
Make sure that you are using the correct case for the Xor part in the chip you are loading.  It must be "Xor", not "xor" or XOR".

If this is not the problem, post the HDL you are trying to load and the exact error message you are getting. (Screen shot of the simulator is good for error message.)

This can happen on Windows because when you write, for instance, "xor(a=a,..." the simulator looks for a file named "xor.hdl" and Windows, ever so helpfully, finds "Xor.hdl" and opens it. The simulator starts parsing the file it thinks is "xor.hdl" and finds the line "CHIP Xor {" and the chip names do not match, so it throws the error.

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

Re: Chip name doesn't match

Emanuel Amit
thank you for answering Mark,
I am not using Xor in my HDL file but a simple and gate.
--Emanuel




Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

ybakos
@Emanuel: Just to be sure, what are the contents of And.hdl?

Also, please post a complete screenshot of your And16.hdl, just to make sure there's nothing invalid at the top.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

Emanuel Amit
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

ybakos
You posted Add16, but we're looking at And16.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

Emanuel Amit
heres the right file but it happens with any chip i try to load And.hdl 
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

cadet1620
Administrator
Emanuel Amit wrote
CHIP And {
    IN a, b;
    OUT out;

    PARTS:
...
    XOr(a=NotA, b=b, out=XOr1);
    XOr(a=a, b=NotB, out=XOr2);
...
}
Your And gate is using Xor, and this is exactly the problem that I first mentioned.
Your Xor gates are misspelled XOr. Notice the upper case "O" in you commands.
These need to be
    Xor(a=NotA, b=b, out=XOr1);
    Xor(a=a, b=NotB, out=XOr2);

Because your And chip is broken, All chips that you try to load that use And, or use any chips that use And, will also fail to load.

You need to build and test the chips in the order they are presented in the book.

  • Build Not using only Nand
  • Build And using only Nand and Not
  • Build Or using only Nand, Not and And
See this post.

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match

Emanuel Amit
Thank you so much it works now.