Loading chip never stops...

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

Loading chip never stops...

ChaseW
This post was updated on .
When I try to open an unchanged .hdl file in projects01.zip (after extraction) it lets me open it and runs fine.
But when i go to create my own .hdl file it just says "Loading chip..." and never finishes, how can I fix it?

This is the Mux Chip im trying to create;

[Correct solution removed by admin.]

PS: im using note pad to create my .hdl file is there a better external text editer i can use. Im very new at this. Any help would be much appreciated

Thanks
Chase
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

ChaseW
dont worry think i figured it out, need to actually create the simple gates first... i hope :)
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

ChaseW
Nope! still get same problem whether i use built-in chips of composite ones. It will just keep trying to load the chip.

Any suggestions would be great

Thanks
Chase
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

Chasew
Figured out that you have to use Nand gate to make up all the others, so it works now.

Sorry if i wasted somebodies time :S
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

cadet1620
Administrator
Usually, when the simulator hangs loading an HDL file is is because of a recursive definition. For instance your And uses Not which uses And.

You need to implement the chips in the order listed in the book: build Not using Nand, then And using Not and Nand, then Or using some combination of And, Nand and Not.

You don't want to use only Nand gates. The ALU from chapter 2 takes 440 Nand gates!

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

Re: Loading chip never stops...

cadet1620
Administrator
In reply to this post by ChaseW
ChaseW wrote
PS: im using note pad to create my .hdl file is there a better external text editer i can use. Im very new at this. Any help would be much appreciated

Thanks
Chase
I like Notepad++, http://notepad-plus-plus.org/

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

Re: Loading chip never stops...

ybakos
Another excellent editor, available on windows, linux and macos: Sublime Text 2.

Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

freak
In reply to this post by cadet1620
Can you please specify which book and from.where I can choose the order
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

cadet1620
Administrator
The book is The Elements of Computing Systems: Building a Modern Computer from First Principles.

You can get PDFs of the Hardware chapters from the Course page at Nand2Tetris web site.

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

Re: Loading chip never stops...

freak
In reply to this post by cadet1620
If iam giving

And( in =a,in = b,out = out )
It is not getting loaded .do we need to use some simple gates to create an AND chip ??
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

cadet1620
Administrator
If you have not done so, read the Hardware Construction Survival Guide.

Read Chapter 1. Implement the chips in the order presented starting at section 1.2.2 (page 19).

Implement and test Not chip using only Nand in the PARTS section.
Implement and test And chip using Nand and Not.
Implement and test OR chip using combination of Nand, Not and And.
Etc.

Hint for Or chip -- read about De Morgan's laws.

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

freak
This post was updated on .
iam getting an error like chip name doesnt match the HDL name
i am trying for AND gate and i just added the below line to ensure if iam
not gettng any error on using NAND gate
NAND (in=a,in=b,out = out);
 but iam not sure regarding this error

[Admin edit to remove email quote.]
Reply | Threaded
Open this post in threaded view
|

Re: Loading chip never stops...

freak
This post was updated on .
In reply to this post by cadet1620
Thank you,i got it

[Admin edit to remove email quote.]