(February 9, 2016 at 12:06 am)bennyboy Wrote: Yes, but when will it make me dinner?
--edit--
Just kidding. Actually, when I was a kid, I used to have breadboards, resistors and LEDs all over my room all the time, connected to the play button of my computer's tape deck which was connected to a PA system, etc.-- I was trying to be tricky like Ferris Bueller! But now that you can model stuff for free using software. . . hmmm can you guys take screen caps or anything? I might jump in there too if you guys start getting into it.



First of all, everything you need to know can be found here at http://www.nand2tetris.org/. The site describes the course, and provides all the project materials and software... including plenty of documentation and tutorials... so all you need to do is buy the book for about 20 quid from amazon or wherever. It's supposed to be a coursera course, but there's isn't one running at the moment, so I'm only working from the book. The software suite itself includes a Hardware Emulator, CPU Emulator, VM Emulator, Assembler, Compiler, Operating System, and Text Comparer but as of the first chapter I've only been introduced to the Hardware Emulator so that'll be what my screencaps will be about. That whole software suite fits in a download of less than 1mb, and only requires the Java Runtime Environment to run.
The Hardware Emulator is very easy to use; you just load your chip (a .hdl file where HDL stands for Hardware Definition Language), load a script to test it (.tst), and press Run. But it's not an IDE... you have to write your HDL files, test scripts, and compare files (.cmp - a truth table of the correct output for the chip - referenced in the script) in a text editor elsewhere. I recommend Notepad++ because it has line numbers which the Hardware Simulator will refer to if there's an error.
For the first project of the book those three files are provided for each of the gates you need to implement, except that the implementation (body) sections of the HDL files are left blank for the student to complete. So I haven't written any test scripts or compare files because there's no need yet, but they seem pretty self-explanatory. Here's my cumbersome Mux chip in HDL (so Mux.hdl):
Here's the provided test script (Mux.tst):
And here's the provided compare file (Mux.cmp):
So basically the Hardware Simulator goes line by line down through the script, creating a truth table of the actual output of the chip for the given inputs (creating a file in the process, Mux.out) and comparing it to the compare file. If the yellow highlight gets to the bottom of the script and the two files match then you get the 'comparison ended successfully' message, which is worth waiting for I can tell you... and is the fun part... having it essentially 'mark' you work

So I hope this was useful, and I hope you do come on board because I think we could have a lot of fun with this, and understand computers 'in the marrow of our bones' as the book puts it, in the process, because these chips here will be used in the next project and so on and so on so you're actually building a computer from scratch... right up to operating systems and high level languages (and hopefully Tetris

