Altera_Forum
Honored Contributor
14 years agobasic (stupid ?) filtering questions
Hi all,
I.m playing with a self-made FIR filter (no fir compiler used). I have read the theory, but the devil is in the implementation, as they say :-P my ADC generates 8 bits values [0-255]. can I just feed these into the filter or do I need to "center the signal around 0", i.e. make sure that the signal value on average is 0 for the calculations to work ? (this would require signed values...) second question, assuming I need signed values: is this correct ? reg [7:0] unsignedval; reg signed [7:0] signedval; // from unsigned to signed signedval <= $signed(unsignedval - 8'd128); // and back : unsignedval <= $unsigned(signedval + 8'sd127 + 8'sd1); (since 8'sd128 does not fit in 8 bits 2scomplement) thanks for getting me up to speed ! ps I built my own filter in order to avoid the added complexity and choice offered by the FIR compiler.