|
|
Hey all, having issues loading a chip after editing it.
-Running Windows 10.
-I am able to load chips I have not yet edited, and run test scripts on them.
-I tried editing the And.hdl chip, as it's the first chip, in notepad.
-I saved it with the same file name, making sure to use ANSI encoding.
-It saves as 'text documents (.txt)' type in the 'Save as type' box, and the only other option is 'All files (.*)
How do I get the chip loaded? Thanks!
|
|
to clarify, it just says "Loading Chip" at the bottom
|
Administrator
|
There is a bug in the HardwareSimulator that causes it to hang while loading if a Chip tries to use itself in the PARTS: section. This most often happens when students start working on Not.hdl.
CHIP Not {
...
PARTS:
Not(...);
}
When writing the Not chip, the only part that you can use is Nand.
Once you have successfully tested your Not, then you can use Not in new chips that you write. You should follow the order presented in the book: Not, And, Or, Xor, ... because you need to use the earlier parts to write the later parts.
--Mark
|
|
Perfect, thank you for the quick and clear response!
|
|
Just tried And chip after successfully doing Not (using Nand), and it's still stuck on 'Loading Chip...'
|
Administrator
|
Does your And have an "And(...);" in its PARTS? It can only use Nand and Not.
--Mark
|
|
it did, I adjusted. thanks... i'm new to all this.
|
Administrator
|
cmprice11 wrote
... i'm new to all this.
My favorite students are people who are eager to learn something completely new!
If you didn't see it, check out the Hardware Construction Survival Kit.
--Mark
|
|
Note that basically all the course tools have some problems like that, even when loading correct definitions or programs. That's why my workflow was to reload new versions of the chips (or programs), but if I see any strange behavior I'd restart the emulator. Also, when I'm finished, I'd run the tests on freshly started simulator to make sure they weren't passing because of a glitch.
|
|
Hi Everybody
So having gone through all the previously mentioned trouble shooting, The Not gate i've written using the Nand gate won't load.
When i load the test script, The Not gate doesn't appear in the HDL box (i've editted it, the char set is us-ascii) and used only the Nand gate in the "PARTS:" section.
There is a Not.out file in the projects/01 directory which is 0 in size (??).
I'm now completely stuck after a few hours getting to this point, any help much appriciated.
Am running Linux mint MATE 17.1 and java version "1.8.0_181". Thanks in advance.. Loz
|
|
I've solved my own problem. You have to get the chip exactly right, before it'll work, there don't seem to be any error messages of any description however.... . .
|
|
It could be a simple typo... temporarily post your code here so we can see it (then remove it after we're done).
ah, I see you've fixed your own problem now... yes, computers are quite particular about being very exact :)
|
|
So I've done a couple of tests, it would seem that the first not gate, if it doesn't work (ie it's PARTS aren't written in the correct way), it won't load into the Hardwaresimulator.
|
|
Re Computers being very exact, indeed. But usually they give you some kind of indication when one isn't being so, usually in the form of a handy error message of one sort or another ;-)
|
|
Ps Thanks for the quick reply, i was wondering whether anyone was still using this forum etc. Loz
|
|
Error messages are written by the person(s) who wrote the program application's code. And they don't always think of each and every possible test condition. Sometimes one can write hdl input that is so bad, that the program doesn't even know what to do with it, much less give a proper error response.
|
|
Maybe this will be useful to others,concerning: INVISIBLE ERROR MESSAGES FROM THE HARDWARESIMULATOR
On my linux system, i wasn't able to see the error bar, and hence it looked like the HardwareSimulator wasn't giving me any errors at all.
My problem was not my terrible code (as i think one commentator said) but the fact i was unable to see any errors at all.
I've made the tool bar (for the GUI linux OS) disappear revealing the all important error message box. I also had to rename my Nand2Tetris folders so that at least some of the error message fits into said error bar (you'll see what i mean if you manage to "discover" your "missing" error box.
Life is now much easier with error messages!
Lozminda
|
|
i am getting an error in loading the HDL file as '' the line 18 has a no source pin"
where the line 18 is the last line of the code.
|
Administrator
|
The reason it is reporting the last line as where the error was found is because it wasn't until the last line that it knew for sure that one of your signals was not being driven by an output.
|
|