diff --git a/rtl/sampler/src/sampler.sv b/rtl/sampler/src/sampler.sv index a6bd290..2ca3fb7 100644 --- a/rtl/sampler/src/sampler.sv +++ b/rtl/sampler/src/sampler.sv @@ -83,7 +83,7 @@ module sampler end if (enable) begin if (!out_of_range_reg) begin - if (cnt_smp_num != smp_num_reg-1) begin + if (cnt_smp_num != smp_num_reg) begin buffer <= data_converted; buffer_ready <= 1; cnt_smp_num <= cnt_smp_num +1; @@ -122,7 +122,7 @@ module sampler end if (enable) begin if (!out_of_range_reg) begin - if (cnt_smp_num != smp_num_reg-1) begin + if (cnt_smp_num != smp_num_reg) begin cnt_smp_num <= cnt_smp_num +1; buffer <= {buffer[DATA_WIDTH*(PACK_FACTOR-1)-1:0], data_converted}; if (cnt == PACK_FACTOR-1) begin