N
naveend
Guest
hi
i am reading a memory file burst.txt using $readmemh.
the memory file is 16(width)*800(depth)
i have a array in my testbench [15:0]burst[1:200]
depending upon one 2-bit i/ps signal i am reading diffrent location from
the memory file .
my code looks as following
reg [1:0] base; // input signal//
reg [15:0] burst[1:200]
case(base)
2'b00:
begin
$readmemh("burst.txt",burst,1,200);
end
2'b01:
begin
$readmemh("burst.txt",burst,201,400);
end
2'b10:
begin
$readmemh("burst.txt",burst,401,600);
end
2'b11:
begin
$readmemh("burst.txt",burst,601,800);
end
endcase
i am facing a problem is that when i/p base="00" initially then memory
file is read properely and array is updated..but when i change the i/p
base="01" or "10" or 11 then the array is not updated with new values of
memory...
regards
naveen
i am reading a memory file burst.txt using $readmemh.
the memory file is 16(width)*800(depth)
i have a array in my testbench [15:0]burst[1:200]
depending upon one 2-bit i/ps signal i am reading diffrent location from
the memory file .
my code looks as following
reg [1:0] base; // input signal//
reg [15:0] burst[1:200]
case(base)
2'b00:
begin
$readmemh("burst.txt",burst,1,200);
end
2'b01:
begin
$readmemh("burst.txt",burst,201,400);
end
2'b10:
begin
$readmemh("burst.txt",burst,401,600);
end
2'b11:
begin
$readmemh("burst.txt",burst,601,800);
end
endcase
i am facing a problem is that when i/p base="00" initially then memory
file is read properely and array is updated..but when i change the i/p
base="01" or "10" or 11 then the array is not updated with new values of
memory...
regards
naveen