Skip to content
Snippets Groups Projects
Commit 8b2cbce9 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

lm32: off-by-one in memory initialization

parent db70c3a3
No related merge requests found
......@@ -26,7 +26,7 @@ assign rdata_o = ram[raddr_r];
integer i;
initial begin
for (i=0;i<addr_depth-1;i=i+1)
for (i=0;i<=addr_depth-1;i=i+1)
ram[i] = 0;
end
......
......@@ -98,7 +98,7 @@ assign read_data = mem[ra];
integer i;
initial begin
for(i=0;i<(1<<address_width)-1;i=i+1)
for(i=0;i<=(1<<address_width)-1;i=i+1)
mem[i] = 0;
end
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment