Is there any functional difference between following two blocks, cuz I am seeing behavioural difference when I am using one than the other
always_comb begin
rd_ptr_next = rd_ptr;
if(rd_en) begin
rd_ptr_next = rd_ptr + 1;
end
end
// and
always @(rd_en, rd_ptr) begin
rd_ptr_next = rd_ptr;
if(rd_en) begin
rd_ptr_next = rd_ptr + 1;
end
end