Forum Discussion
Altera_Forum
Honored Contributor
12 years agoso basically you want to add in that order:
taps = 4, add [0] only taps = 8, add [0] +[1] taps = 16, add [0]+[1]+[2]+[3]...etc but your first generate statement is not doing that. I suggest you run a hardware counter as integer say from 0 to taps/4-1 and so it adjusts to number of taps. Then set your logic such that count is used as index. that is something like this: sum <= sum+addition(count); thus the feedback loop will take care of it as the counter runs.