fix: cnt_smp_num sampler

This commit is contained in:
otroubi
2026-05-08 14:08:01 +03:00
parent 8c4154baf0
commit 9b72dfb8d9

View File

@ -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