Running Average

Gotta maintain that average

You are asked to design a parameterized running average calculator which produces the average of the last N samples.

Interface Definition

N : Parameter which selects the number of samples to consider for calculating the average
clk : Clock
reset : Active high reset
data_i[31:0]: The 32-bit input data
average_o[31:0]: The 32-bit output which gives the average of the last N samples

Loading the interactive workspace...