Configure filter for integer filtering
set2int(h)
set2int(h,coeffwl)
set2int(...,inwl)
g = set2int(...)
This section applies to discrete-time (dfilt
)
filters.
set2int(h)
scales the filter
coefficients to integer values and sets the filter coefficient and
input fraction lengths to zero.
set2int(h,coeffwl)
uses
the number of bits specified by coeffwl
as the
word length it uses to represent the filter coefficients.
set2int(...,inwl)
uses
the number of bits specified by coeffwl
as the
word length it uses to represent the filter coefficients and the number
of bits specified by inwl
as the word length to
represent the input data.
g = set2int(...)
returns
the gain g
introduced into the filter by scaling
the filter coefficients to integers. g
is always
calculated to be a power of 2.
Note
set2int
does not work with CIC decimators
or interpolators because they do not have coefficients.