0) System
Windows 10
Java 8
Hardware Simulator 2.5
1) Open Hardware Simulator
(navigate to tools folder, double click the batch file)
2) hit Load Chip
select Xor file I typed in from the video using Notepad++, in projects/01. Saved as ANSI not UTF8 (although the two should be the same?)
(file loads correctly I think, I see the HDL and can click to show the Internal Parts etc.)
3) change Input Pins value
Eval button stays disabled
Output pins don't grey out to show they are out of date.
4) run test script for Xor
Fails because every output value of my chip is 0.
---
If I load the Xor in projects/demo, all is well and it works fine.
My HDL:
// 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/Xor.hdl
/**
* Exclusive-or gate:
* out = not (a == b)
*/
CHIP Xor {
IN a, b;
OUT out;
PARTS:
Not (in=a, out=nota);
Not (in=b, out=notb);
And (a=a, b=notb, out=w1);
And (a=nota, b=b, out=w2);
Or (a=w1, b=w2, out=out);
}