From 65e4657650fcd4ade5914090276d6373d96a01a9 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Fri, 11 Nov 2022 15:51:08 +0300 Subject: [PATCH] Minor fix for read_ahead_buf --- read_ahead_buf.sv | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/read_ahead_buf.sv b/read_ahead_buf.sv index 6b6cc8c..e8a7e5d 100755 --- a/read_ahead_buf.sv +++ b/read_ahead_buf.sv @@ -120,14 +120,11 @@ module read_ahead_buf #( parameter logic latch_req; logic [DATA_W-1:0] r_data_latch; always_comb begin - latch_req = (fantom_read || normal_read) || + latch_req = ( fantom_read || normal_read ) || ( fifo_empty && r_req ); // buffer depletion - if( ( fantom_read || normal_read ) || - ( fifo_empty && r_req ) ) begin + if( latch_req ) begin r_data_latch[DATA_W-1:0] = fifo_r_data[DATA_W-1:0]; - //end else if( fifo_empty && r_req ) begin // buffer depletion - // r_data_latch[DATA_W-1:0] = '0; end else begin r_data_latch[DATA_W-1:0] = '0; end