Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- The common arithmetic average of N samples is calculated by summing the samples and then dividing by N. Since division by a number which is not power of 2 is resource consuming, you can avoid it by discarding the N factor which is actually not relevant since it's simply a constant multiplier. The multiple & sigCReg(13) simply serves for the purpose of sign extending the 14 bit ADC sample to the 18 bit wide sum. --- Quote End --- Than you for your reply. But whether you mean I can discard the 10(the N in this code),and calculate the turth value when those datas uploaded to the computer.