Forum Discussion
Altera_Forum
Honored Contributor
13 years agohaving 1000 stages for 12 bits x 2 will require 24000 registers so you need to use ram for that.
However 1000 stages is an overkill. If so I will use block averager that only needs accumulator for 1024 samples then divide sum by discarding 10 LSBs at the end of each 1024 samples block then clear the sum and restart second block. You will get some segmentation of result(sharp corners) but you can then if you wish average the block results. Regarding your code that "works", it looks ok to me.