lm32: remove unneeded parameter in lm32_dp_ram
authorMichael Walle <michael@walle.cc>
Mon, 12 Nov 2012 18:36:15 +0000 (19:36 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 14 Nov 2012 13:08:41 +0000 (14:08 +0100)
addr_depth can be computed by addr_width.

Signed-off-by: Michael Walle <michael@walle.cc>
verilog/lm32/lm32_cpu.v
verilog/lm32/lm32_dp_ram.v

index ee0daf43b7a78be4ab572b92b686c94cddd34bd8..ca06927e6eca483a8db3da339957f71fc8d8c506 100644 (file)
@@ -1324,7 +1324,6 @@ lm32_debug #(
    lm32_dp_ram
      #(
        // ----- Parameters -----
-       .addr_depth(1<<5),
        .addr_width(5),
        .data_width(32)
        )
@@ -1343,7 +1342,6 @@ lm32_debug #(
 
    lm32_dp_ram
      #(
-       .addr_depth(1<<5),
        .addr_width(5),
        .data_width(32)
        )
index 6ef952abafa4d395d90661796e94d2b4e3b7e6b2..bba523ed295e49f6d6b7a33a9e0557e01af30c24 100644 (file)
@@ -8,7 +8,6 @@ module lm32_dp_ram(
        rdata_o);
 
 parameter addr_width = 32;
-parameter addr_depth = 1024;
 parameter data_width = 8;
 
 input clk_i;
@@ -19,7 +18,7 @@ input [data_width-1:0] wdata_i;
 input [addr_width-1:0] raddr_i;
 output [data_width-1:0] rdata_o;
 
-reg [data_width-1:0] mem[addr_depth-1:0];
+reg [data_width-1:0] mem[(1<<addr_width)-1:0];
 
 reg [addr_width-1:0] raddr_r;
 assign rdata_o = mem[raddr_r];