Forum Discussion
Altera_Forum
Honored Contributor
14 years agoYou should create a testbench for the filter.
The first test to implement is the impulse response of the filter. You do this by generating an input data sequence consisting of the largest positive word, eg. 7Fh for an 8-bit 2's compliment number, followed by zeros. The impulse response at the output should match your filter tap coefficients multiplied by 7F, and then truncated/rounded by whatever your multiplication logic implements. If your filter output preserves all product bits, then you could just use a logic 1 for the impulse, and the output will be your filter taps, or, you might prefer to use an input of 0100_0000b = 40h, since then you just right-shift the filter taps, and truncate/round. Cheers, Dave