Chargement…
Chargement…
Four-sample moving-average filter with no reset input.
Behaviour:
o_data is combinational and continuously equals (i_data + r_x1 + r_x2 + r_x3) / 4, with the fractional part discarded.r_x1, r_x2, and r_x3 hold the three previously stored samples. They are initialized to zero.i_clk, i_data enters the delay line and the oldest sample is discarded.i_data value, apply it after an edge and read o_data before the following edge.*Division by 4 is a right shift by 2 bits.*
i_clki_datao_data