Chip name doesn't match the HDL name

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

Chip name doesn't match the HDL name

shinhyonphil
This post was updated on .
Hi,

I edited And.hdl gate in eclipse IDE and tried to load the edited chip.

Then the Hardware Simulator won't load the chip with showing 'Chip name doesn't match the HDL name'

message on the bottom.

Attached is the screen shot of the message.

Can you tell me how I can fix the problem and load the edited chip please?

Error message

Thank you for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match the HDL name

WBahn
Administrator

What is the part name in your .hdl file?
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match the HDL name

WBahn
Administrator
What is on line 12 of the file?

What OS are you using?

Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match the HDL name

shinhyonphil
I am using MS Windows 10.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match the HDL name

shinhyonphil
In reply to this post by WBahn
I am sorry, I don't understand your question of 'what is the part name in your .hdl file?'

I was trying to open AND.hdl from project 01 file which I downloaded from nand2tetris site.

I opened AND.hdl file using eclipse IDE editor, then I wrote code inside as such;

// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/01/And.hdl

/**
 * And gate:
 * out = 1 if (a == 1 and b == 1)
 *       0 otherwise
 */

CHIP And {
    IN a, b;
    OUT out;

    PARTS:
    NAND(a=a, b=b, out=c);
    NAND(a=c, b=c, out=out);
}

Then I saved the edited chip and the Hardware simulator shows error message and won't load the chip.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match the HDL name

WBahn
Administrator
By Part name I meant Chip name (look at line 12).

I don't think this should be an issue (since it's Win10), but the error message is saying that the HDL file is named "AND.hdl" instead of "And.hdl". But some of it depends on where the comparison is being made.

Just to remove that possibility, rename the file to "And.hdl". You might need to change it first to something that is different even when case-insensitive, such as "myAnd.hdl" and then rename it again to "And.hdl".

See if that helps at all.
Reply | Threaded
Open this post in threaded view
|

Re: Chip name doesn't match the HDL name

shinhyonphil
It worked.

Thank you very much for your help.