diff options
Diffstat (limited to 'projects/05/Memory.hdl')
-rw-r--r-- | projects/05/Memory.hdl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/projects/05/Memory.hdl b/projects/05/Memory.hdl index 62a4fd2..8d3d47c 100644 --- a/projects/05/Memory.hdl +++ b/projects/05/Memory.hdl @@ -28,4 +28,19 @@ CHIP Memory { PARTS:
// Put your code here:
-}
\ No newline at end of file + DMux(in=load, sel=address[14], a=mload, b=load1);
+ DMux(in=load1, sel=address[13], a=sload, b=kload);
+ RAM16K(in=in, load=mload, address=address[0..13], out=mout);
+ Screen(in=in, load=sload, address=address[0..12], out=sout);
+
+ Or8Way(in=address[0..7], out=or1);
+ Or8Way(in=address[5..12], out=or2);
+ Or(a=or1, b=or2, out=ksel);
+
+ Keyboard(out=out1);
+ Mux16(a=out1, b=in, sel=kload, out=kout);
+
+ Mux16(a=kout, b=false, sel=ksel, out=fout1);
+ Mux16(a=sout, b=fout1, sel=address[13], out=fout2);
+ Mux16(a=mout, b=fout2, sel=address[14], out=out);
+}
|