util_adcfifo: fix read pointer

Read pointer should be always behind the write pointer except when it
reaches the last memory location where the writer stops.
main
Laszlo Nagy 2019-12-02 13:14:20 +00:00 committed by Laszlo Nagy
parent 82021edffe
commit a25323b246
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ module util_adcfifo #(
assign dma_read_rst_s = ~dma_xfer_req; assign dma_read_rst_s = ~dma_xfer_req;
assign dma_wready_s = (DMA_READY_ENABLE == 0) ? 1'b1 : dma_wready; assign dma_wready_s = (DMA_READY_ENABLE == 0) ? 1'b1 : dma_wready;
assign dma_rd_s = (dma_raddr <= {1'b0, dma_waddr_int}) ? dma_wready_s : 1'b0; assign dma_rd_s = ((dma_raddr < {1'b0, dma_waddr_int}) || &dma_waddr_int) & dma_wready_s;
always @(posedge dma_clk) begin always @(posedge dma_clk) begin
if (dma_read_rst_s == 1'b1) begin if (dma_read_rst_s == 1'b1) begin