X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=gcram.v;h=7e618e276f931ff68a09170d93748dd061d6ff9b;hb=44b73af51bca05eb26fd1557a192eed779fc065e;hp=bb03b360212015abe9e0a7eabcc6a75887bbeeaa;hpb=2ed306f8640ffdad28bea2e6487e617e81cdde2c;p=yule.git diff --git a/gcram.v b/gcram.v index bb03b36..7e618e2 100644 --- a/gcram.v +++ b/gcram.v @@ -1,6 +1,6 @@ module GCRAM -(input clk, input we, input[5:0] addr, input[7:0] di, output reg [7:0] do, output reg [7:0] result); - reg [7:0] mem [(1<<5)-1:0]; +(input clk, input we, input[12:0] addr, input[15:0] di, output reg [15:0] do, output reg [15:0] result); + reg [15:0] mem [255:0]; always @ (posedge clk) do <= #1 mem[addr]; @@ -13,15 +13,17 @@ module GCRAM result <= mem[6]; initial begin - mem[0] <= 0; - mem[1] <= 0; - mem[2] <= 8'b00100000; - mem[3] <= 8'b00100000; - mem[4] <= 8'd8; - mem[5] <= 8'b11101000; /* QUOTE 8 */ - mem[6] <= 0; - mem[7] <= 8'd49; - mem[8] <= 8'd49; - mem[9] <= 8'd49; + mem[ 0] <= 0; // (cdr part of NIL) + mem[ 1] <= 0; // (car part of NIL) + mem[ 2] <= 16'b0010000000000000; // (cdr part of T) + mem[ 3] <= 16'b0010000000000000; // (car part of T) + mem[ 4] <= 16'd12; // (free storage pointer) + mem[ 5] <= 16'b1100000000000111; // CALL 7 + mem[ 6] <= 0; // (result of computation) + mem[ 7] <= 16'b0000000000001001; // MORE 9 + mem[ 8] <= 16'b0010000000000101; // NUMBER 5 + mem[ 9] <= 16'b1110000000000000; // FUNCALL NIL + mem[10] <= 16'b1000000000001011; // PROC 11 + mem[11] <= 16'b0101111111111110; // VAR -2 end endmodule