Re: Simulator crashes when loading chip
Posted by dave on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Simulator-crashes-when-loading-chip-tp3289029p3289060.html
As I am working on this same 32-bit register problem, I tried another solution, namely to build it out of 32 single bits, namely:
CHIP Register32 {
IN in[32], load;
OUT out[32];
PARTS:
Bit(in=in[0], out=out[0], load=load);
Bit(in=in[1], out=out[1], load=load);
Bit(in=in[2], out=out[2], load=load);
...
Bit(in=in[15], out=out[15], load=load);
Bit(in=in[16], out=out[16], load=load); // <== this is the line that causes the problem
...
}
but the index 16 on the last line shown above generates the same exception in the hardware simulator.
Does that mean that I can never use indices larger than 15 in my hdl??? Someone, please help me find a way around this 8^) Thank you!!!