Utilizing the filterBuilder Gui I generated a FIR Single Rate LP Filter.
The GUI offers the option of generating a DOFILTER function that generates a scripted base instance of the filter and you can test the output
of the designed filter with a certain input.
For my case I designed the filter for the data generated by an ADC which are 24bit signed integers.
In my case as an input signal I set the option for "Fixed Point" Arithmeticm the input signal word length to 24 bits.
I also used 26 bit coefficients and a result that will be provided in full scale.
Below is a rudimentary script that feeds integer numbers from 0-255 in the filter in order to check its output by comparing this with the data generated by the simulation HDL IDE.
I have two questions.
How I can feed actually 24 bit signed (2's complement) values and how I can get as an output the actual y (52-bit width) binary values?
% Define the range from 0 to 255
startValue = 0;
endValue = 255;
% Create a column vector with values from 0 to 255
x = int32(startValue:endValue)';
% Display the resulting matrix
%disp(x);
y = doFilter(x);