+/TECS

git clone https://git.julia.blue/+/TECS

P1n3appl3Remove headers5e97a3a

master
751 B19 linesraw
1/**
2 * Memory of 16K registers, each 16 bit-wide. Out holds the value
3 * stored at the memory location specified by address. If load==1, then 
4 * the in value is loaded into the memory location specified by address 
5 * (the loaded value will be emitted to out from the next time step onward).
6 */
7
8CHIP RAM16K {
9    IN in[16], load, address[14];
10    OUT out[16];
11
12    PARTS:
13    DMux4Way(in=load,sel=address[12..13],a=w1,b=w2,c=w3,d=w4);
14    RAM4K(in=in,load=w1,address=address[0..11],out=w9);
15    RAM4K(in=in,load=w2,address=address[0..11],out=w10);
16    RAM4K(in=in,load=w3,address=address[0..11],out=w11);
17    RAM4K(in=in,load=w4,address=address[0..11],out=w12);
18    Mux4Way16(a=w9,b=w10,c=w11,d=w12,sel=address[12..13],out=out);
19}