util_wfifo: Fix reset related timing violation

The memory instance reset connected to ground, rather than connect to dout_rstn.
main
Istvan Csomortani 2015-09-23 16:34:55 +03:00
parent 516c59523d
commit 900db3d8ed
1 changed files with 1 additions and 2 deletions

View File

@ -313,15 +313,14 @@ module util_wfifo (
end
always @(posedge dout_clk) begin
dout_rdata_d <= dout_rdata_s;
if (dout_rstn == 1'b0) begin
dout_rd <= 'd0;
dout_rd_d <= 'd0;
dout_rdata_d <= 'd0;
dout_raddr <= 'd0;
end else begin
dout_rd <= dout_rd_s;
dout_rd_d <= dout_rd;
dout_rdata_d <= dout_rdata_s;
if (dout_rd_s == 1'b1) begin
dout_raddr <= dout_raddr + 1'b1;
end