The Hardware Simulator freezes while processing my Memory.hdl file, right after I press the "Load Chip" button. The lower pane says "Loading Chip", but nothing seems to happen next (I waited for about 20 minutes). I can't spot any process activity through task manager (CPU load, abnormal RAM usage, disk load etc.), so I doubt that the simulator is actually doing anything in the background. I tried replacing all of the builtin components used in the HDL file by my own versions from the previous projects, I also tried ivant's version 2.6.2 of the simulator, no futher success so far, since I don't have any java programming experience.
I appreciate any suggestions for my HDL code, since the sumulator refuses to yield any meaningful response.
//Assuming out = 0 for any illegal address
CHIP Memory {
IN in[16], load, address[15];
OUT out[16];
PARTS:
//SET part
DMux8Way(in=load,
sel[0]=address[12], sel[1]=address[13], sel[2]=address[14],
a=ramload0, b=ramload1, c=ramload2, d=ramload3, //000 - 011
e=screenloadlo, f=screenloadhi, //100 - 101
g=false, //110 (keycode can't be loaded)
h=false); //111 (overflow)
//4x4K RAM arrangement fits better than 1x16K
RAM4K(in=in, load=ramload0, address=address[0..11], out=ramout0);
RAM4K(in=in, load=ramload1, address=address[0..11], out=ramout1);
RAM4K(in=in, load=ramload2, address=address[0..11], out=ramout2);
RAM4K(in=in, load=ramload3, address=address[0..11], out=ramout3);
//Screen
Or(a=screenloadlo, b=screenloadhi, out=screenload);
Screen(in=in, load=screenload, address=address[0..12], out=screenout);
//GET part
//Keyboard
Keyboard(out=keyval);
//the only legit address: 110 0000 0000 0000
Or8Way(in=address[0..7], out=overflowlo);
Or8Way(in[0]=address[8], in[1]=address[9], in[2]=address[10], in[3]=address[11], in[4]=address[12],
in[5]=false, in[6]=false, in[7]=false, //final multiplexor takes care of these bits
out=overflowhi);
Or(a=overflowlo, b=overflowhi, out=overflow);
Mux16(a=keyval, b=false, sel=overflow, out=keyout);
//final output
Mux8Way16(a=ramout0, b=ramout1, c=ramout2, d=ramout3, //000 - 011 (RAM banks)
e=screenout, f=screenout, //100 - 101 (Screen)
g=keyout, //110 (Keyboard)
h=false, //111 (overflow)
sel[0]=address[12], sel[1]=address[13], sel[2]=address[14],
out=out);
}