描述
使用三态以太网MAC v4.5及之前的示例设计中提供的本地链路FIFO并以10Mb / s或100Mb / s运行时,如果在中间发出复位,FIFO可能无法正确清除写入FIFO。
解
要解决此问题,请更改文件rx_client_fifo.v / vhd中的reg_eof_p以添加重置。
VHDL:
从example_design / fifo / rx_client_fifo.vhd的第784行开始更改:
reg_eof_p:进程(wr_clk)
开始
if(wr_clk’event和wr_clk =’1’)然后
如果wr_enable =’1’那么
wr_dv_pipe(0)<= rx_data_valid;
wr_dv_pipe(1)<= wr_dv_pipe(0);
wr_eof_bram(0)<= wr_dv_pipe(1)而不是wr_dv_pipe(0);
万一;
万一;
结束过程reg_eof_p;
至:
reg_eof_p:进程(wr_clk)
开始
if(wr_clk’event和wr_clk =’1’)然后
如果wr_sreset =’1’则
wr_dv_pipe <=(其他=>’0’);
wr_eof_bram <=(others =>’0’);
elsif wr_enable =’1’然后
wr_dv_pipe(0)<= rx_data_valid;
wr_dv_pipe(1)<= wr_dv_pipe(0);
wr_eof_bram(0)<= wr_dv_pipe(1)而不是wr_dv_pipe(0);
万一;
万一;
结束过程reg_eof_p;
Verilog的:
从example_design / fifo / rx_client_fifo.v的第771行开始更改:
总是@(posedge wr_clk)
开始
if(wr_enable == 1’b1)开始
wr_dv_pipe [0] <= rx_data_valid;
wr_dv_pipe [1] <= wr_dv_pipe [0];
wr_eof_bram [0] <= wr_dv_pipe [1]&!wr_dv_pipe [0];
结束
结束
至:
总是@(posedge wr_clk)
开始
if(wr_sreset == 1’b1)开始
wr_dv_pipe [0] <= 1’b0;
wr_dv_pipe [1] <= 1’b0;
wr_eof_bram <= 1’b0;结束
否则if(wr_enable == 1’b1)开始
wr_dv_pipe [0] <= rx_data_valid;
wr_dv_pipe [1] <= wr_dv_pipe [0];
wr_eof_bram [0] <= wr_dv_pipe [1]&!wr_dv_pipe [0];
结束
结束
没有回复内容