projects/01/Xor.hdl

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

projects/01/Xor.hdl

leder
Hi all,

the demo/Xor.hdl compiles well, but when I edit the 01/Xor.hdl to exactly the same contents:

CHIP Xor {
    IN a, b;
    OUT out;

    PARTS:
    Not (in=a, out=nota);
    Not (in=b, out=notb);
    And (a=a, b=notb, out=x);
    And (a=nota, b=b, out=y);
    Or (a=x, b=y, out=out);
}

I get the compiler error:

leder@home-ryzen:~/nand2tetris/projects/01$ HardwareSimulator Xor.hdl
In script /home/leder/nand2tetris/projects/01/Xor.hdl, Line 12, Illegal terminator: '{'
Reply | Threaded
Open this post in threaded view
|

Re: projects/01/Xor.hdl

WBahn
Administrator
Upload your actual file and I will see if it works on my installation.

Where you are doing your work, do you have the other parts (Not, And, and Or) fully implemented? If these still just have the template code provided by the authors, then the part can't work because it is trying to use parts that don't contain any implementation.