Cant load hdl file to the simulator

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

Cant load hdl file to the simulator

yohai
Hi,
I create an hdl file using notepad++ for NOT gate. the code is correct since I copied it from relible source.
1. when I save is with hdl extention the simulator can recognize that this is had file, so i need to save is with v extention only then it is recognized as hdl file.
2 even after it is save as hdl and i tried to load it to the simulator..... nothig hapen the simulator is blank

Many thanks for the help
Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

hdllearn
I am not sure, as I am also a novice. But check if the curly brackets are correctly placed, and if there are semicolons at the end of each line.
John
Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

WBahn
Administrator
In reply to this post by yohai
I don't know what you mean by "the simulator can recognize that this is had file". I think you have a typo or two there.

Are you sure you are using the correct simulator (the hardware simulator and not one of the others).

There should be an error message in the status bar at the bottom of the screen -- you may need to expand your window to see it, or move the window from a laptop screen to an external screen.

Upload your Not.hdl file so that we can see it to rule out an error in it.
Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

yohai
THIS IS THE FILE THAT CONNOT BE OPENDED WITH THE SIMULATOR:
THANKS,

// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: tools/builtInChips/Not.hdl
 /**
 * Not gate:
 * out = ((in == 0), 1, 0)
 */
 
 CHIP Not {
    IN  in;
    OUT out;

    PARTS:
        Nand(a=in, b=in, out=out);
        }
Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

yohai
In reply to this post by hdllearn
THIS IS THE FILE THAT CANNOT BE OPENDED BY THE SIMULATOR
THANKS, YOCHAI


// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: tools/builtInChips/Not.hdl
 /**
 * Not gate:
 * out = ((in == 0), 1, 0)
 */
 
 CHIP Not {
    IN  in;
    OUT out;

    PARTS:
        Nand(a=in, b=in, out=out);
        }
Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

WBahn
Administrator
Where are you putting this file on your machine?

Which folder is the current working folder when you run the simulator?

How are you launching the simulator?

Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

yohai
HI
the directory desktop/nanattetrisTOP/nand2tetris/tools
contain the HardwareSimulator this is the simulator i am using.
the directory desktop/nanattetrisTOP/nand2tetris/projects/1 contain all  the files and I added a file NOTbyyohai which i am trying to open

Reply | Threaded
Open this post in threaded view
|

Re: Cant load hdl file to the simulator

yohai
In reply to this post by yohai
thanks found the problem - the name of the gate must match the name of the file