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

RAM512, RAM4K, and RAM16K

Changeset 50e1a57a2f0c

Parent a908f248b1fc

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to 3 files · Browse files at 50e1a57a2f0c Showing diff from parent a908f248b1fc Diff from another changeset...

 
15
16
17
18
19
 
 
 
 
 
 
 
 
 
15
16
17
 
 
 
18
19
20
21
22
23
24
@@ -15,5 +15,10 @@
  OUT out[16];     PARTS: - // Put your code here: -} \ No newline at end of file
+ DMux4Way(in=load, sel=address[12..13], a=load0, b=load1, c=load2, d=load3); + RAM4K(in=in, load=load0, address=address[0..11], out=out0); + RAM4K(in=in, load=load1, address=address[0..11], out=out1); + RAM4K(in=in, load=load2, address=address[0..11], out=out2); + RAM4K(in=in, load=load3, address=address[0..11], out=out3); + Mux4Way16(a=out0, b=out1, c=out2, d=out3, sel=address[12..13], out=out); +}
Change 1 of 1 Show Entire File 03/​b/​RAM4K.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[9..11], a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); + RAM512(in=in, load=load0, address=address[0..8], out=out0); + RAM512(in=in, load=load1, address=address[0..8], out=out1); + RAM512(in=in, load=load2, address=address[0..8], out=out2); + RAM512(in=in, load=load3, address=address[0..8], out=out3); + RAM512(in=in, load=load4, address=address[0..8], out=out4); + RAM512(in=in, load=load5, address=address[0..8], out=out5); + RAM512(in=in, load=load6, address=address[0..8], out=out6); + RAM512(in=in, load=load7, address=address[0..8], out=out7); + Mux8Way16(a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address[9..11], out=out); +}
 
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[6..8], a=load0, b=load1, c=load2, d=load3, e=load4, f=load5, g=load6, h=load7); + RAM64(in=in, load=load0, address=address[0..5], out=out0); + RAM64(in=in, load=load1, address=address[0..5], out=out1); + RAM64(in=in, load=load2, address=address[0..5], out=out2); + RAM64(in=in, load=load3, address=address[0..5], out=out3); + RAM64(in=in, load=load4, address=address[0..5], out=out4); + RAM64(in=in, load=load5, address=address[0..5], out=out5); + RAM64(in=in, load=load6, address=address[0..5], out=out6); + RAM64(in=in, load=load7, address=address[0..5], out=out7); + Mux8Way16(a=out0, b=out1, c=out2, d=out3, e=out4, f=out5, g=out6, h=out7, sel=address[6..8], out=out); +}