Login  Register

Chips wont load

Posted by MythicSword on Feb 03, 2022; 5:00pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Chips-wont-load-tp4036619.html

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);
}