Forum Discussion
Altera_Forum
Honored Contributor
12 years agocontinuous averaging using VHDL
I have a question related to VHDL programming. I want to calculate the continuous average. My example code is:
process (clk, reset)
begin
if (reset = '1') then
state<=idle;
out-v...
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- then take the result of subtraction into an accumulator (feedback adder with one register). truncate the accumulator sum as suitable. --- Quote End --- discard 5 LSBs from accumulator result. The first initial 31 samples will not be correct but the stream will then get right.