Login  Register

Chips wont load

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

Chips wont load

MythicSword
2 posts
The Hardware Simulator won't load the mux chip I made. I independently checked the Or, Xor, Not, and And functions and they work but the chip wont load. I had this issue before and I deleted and redownloaded the who set of projects twice which fixed it but it keeps happening and I don't know why. I am following the order of the components in the book and only using those components. My Mux.hdl file is below.

// 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/Mux.hdl

/**
 * Multiplexor:
 * out = a if sel == 0
 *       b otherwise
 */

CHIP Mux {
    IN a, b, sel;
    OUT out;

    PARTS:
    // Put your code here:
    Not(in=sel,out=sel1);
    And(a=sel1,b=a,out=o1);
    And(a=sel,b=b,out=o2);
    Xor(a=o1,b=02,out=out);
}
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Chips wont load

rleininger
59 posts
This post was updated on Feb 03, 2022; 5:58pm.
When I load your Mux.hdl file into the Hardware Simulator, I get the error message:

In HDL file: C:\Documents\Nand2Tetris\Test\Mux.hdl, Line 16, A pin name is expected

Is this what you are seeing?  Of course, you path to the file Mux.hdl will be different.

Your error is definitely on the line indicated by the message.