fix: cnt_smp_num sampler
This commit is contained in:
@ -83,7 +83,7 @@ module sampler
|
|||||||
end
|
end
|
||||||
if (enable) begin
|
if (enable) begin
|
||||||
if (!out_of_range_reg) 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 <= data_converted;
|
||||||
buffer_ready <= 1;
|
buffer_ready <= 1;
|
||||||
cnt_smp_num <= cnt_smp_num +1;
|
cnt_smp_num <= cnt_smp_num +1;
|
||||||
@ -122,7 +122,7 @@ module sampler
|
|||||||
end
|
end
|
||||||
if (enable) begin
|
if (enable) begin
|
||||||
if (!out_of_range_reg) 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;
|
cnt_smp_num <= cnt_smp_num +1;
|
||||||
buffer <= {buffer[DATA_WIDTH*(PACK_FACTOR-1)-1:0], data_converted};
|
buffer <= {buffer[DATA_WIDTH*(PACK_FACTOR-1)-1:0], data_converted};
|
||||||
if (cnt == PACK_FACTOR-1) begin
|
if (cnt == PACK_FACTOR-1) begin
|
||||||
|
|||||||
Reference in New Issue
Block a user