Public » Elements of Computing
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

PC and RAM64

Changeset a908f248b1fc

Parent 31aba62bbd71

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to 2 files · Browse files at a908f248b1fc Showing diff from parent 31aba62bbd71 Diff from another changeset...

Change 1 of 1 Show Entire File 03/​a/​PC.hdl Stacked
 
16
17
18
19
 
 
 
 
 
 
20
21
22
23
24
 
16
17
18
 
19
20
21
22
23
24
25
 
 
 
 
@@ -16,9 +16,10 @@
  OUT out[16];     PARTS: - // Put your code here: + Inc16(in=rout, out=plusone); + Mux16(a=rout, b=plusone, sel=inc, out=mayberin0); + Mux16(a=mayberin0, b=in, sel=load, out=mayberin1); + Mux16(a=mayberin1, b[0..15]=false, sel=reset, out=rin); + Register(in=rin, load=true, out=rout); + And16(a=rout, b=rout, out=out);  } - - - -
Change 1 of 1 Show Entire File 03/​a/​RAM64.hdl Stacked
 
15
16
17
18
19
 
 
 
 
 
 
 
 
 
 
 
 
 
15
16
17
 
 
 
18
19
20
21
22
23
24
25
26
27
28
@@ -15,5 +15,14 @@
  OUT out[16];     PARTS: - // Put your code here: -} \ No newline at end of file
+ DMux8Way(in=load, sel=address[3..5], a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); + RAM8(in=in, load=load0, address=address[0..2], out=out0); + RAM8(in=in, load=load1, address=address[0..2], out=out1); + RAM8(in=in, load=load2, address=address[0..2], out=out2); + RAM8(in=in, load=load3, address=address[0..2], out=out3); + RAM8(in=in, load=load4, address=address[0..2], out=out4); + RAM8(in=in, load=load5, address=address[0..2], out=out5); + RAM8(in=in, load=load6, address=address[0..2], out=out6); + RAM8(in=in, load=load7, address=address[0..2], out=out7); + Mux8Way16(a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address[3..5], out=out); +}