always @(posedge rdclk)
begin
if (rdreq )
begin
addr<=addr+17'd1;
data_ram<=data_fifo;
if (addr>=17`d3840)
begin
addr<=addr>=17`d3840;
data_ram<=16'd0;
end
end ////if if addr>=17'38400
else
begin
addr<=17'd0;
data_ram<=16'dz;
end
end //////if else rdreq 数据传输时出现大面积错误
做如下改动,不管输入什么,输出永远都是第一个数据的值,搞不懂是哪的问题
always @(posedge rdclk)
begin
if (rdreq )
begin
addr<=addr+17'd1;
data_ram<=data_fifo;
else
begin
addr<=17'd0;
data_ram<=16'dz;
end
end //////