shethpurak
Junior Member level 1
Hi
This is how I have implemented my dual port ram
always@(posedge clk) begin
if(wr_en)
mem[wr_ptr] <= data_in;
end
always@(posedge clk) begin
if(rd_en)
data_out <= mem[rd_ptr];
end
Somehow in the simulations my data_out is 1 clock delayed. it gets output after 1 clock delay after rd_en.
I know one is use asynchronous read using assign statements. Is there any solutions with keeping the read synchronous so that my read happens at the same time I get the rd_en.
Please let me know
Thanks
This is how I have implemented my dual port ram
always@(posedge clk) begin
if(wr_en)
mem[wr_ptr] <= data_in;
end
always@(posedge clk) begin
if(rd_en)
data_out <= mem[rd_ptr];
end
Somehow in the simulations my data_out is 1 clock delayed. it gets output after 1 clock delay after rd_en.
I know one is use asynchronous read using assign statements. Is there any solutions with keeping the read synchronous so that my read happens at the same time I get the rd_en.
Please let me know
Thanks