aboutsummaryrefslogtreecommitdiff
path: root/projects/05
diff options
context:
space:
mode:
Diffstat (limited to 'projects/05')
-rw-r--r--projects/05/CPU.hdl2
-rw-r--r--projects/05/Computer.hdl4
2 files changed, 6 insertions, 0 deletions
diff --git a/projects/05/CPU.hdl b/projects/05/CPU.hdl
index 904a521..aeeac04 100644
--- a/projects/05/CPU.hdl
+++ b/projects/05/CPU.hdl
@@ -76,5 +76,7 @@ CHIP CPU {
PC(in=out2, load=isjump, inc=isnotjump, reset=reset, out[0..14]=pc);
And(a=instruction[15], b=instruction[3], out=writeM);
+ //And(a=instruction[15], b=instruction[3], out=out6);
+ //DFF(in=out6, out=writeM);
}
diff --git a/projects/05/Computer.hdl b/projects/05/Computer.hdl
index 22f9b48..a34dcae 100644
--- a/projects/05/Computer.hdl
+++ b/projects/05/Computer.hdl
@@ -20,4 +20,8 @@ CHIP Computer {
PARTS:
// Put your code here:
+ CPU(reset=reset, instruction=instruction, inM=inM, writeM=writeM, outM=outM, addressM=addressM, pc=pc);
+ DFF(in=writeM, out=load);
+ Memory(in=outM, address=addressM, load=load, out=inM);
+ ROM32K(address=pc, out=instruction);
}