summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2017-12-17 10:30:45 +0100
committerYuchen Pei <me@ypei.me>2017-12-17 10:30:45 +0100
commitc44b4ac2e504c62c24393747b1a32b7995e9dd3c (patch)
tree7a9d464b1682736da954c95e662eaabe32843f6f
parent2e26c3ff80fe5c934a1a0a59f663c6ac45ded56a (diff)
having problem with Computer chip
- circle in chips
-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);
}