3
$\begingroup$

It's very easy to make a filter in Scipy or many other tools, but implementing this filter in fixed point in C or VHDL/Verilog is always a chore. I mean, in theory it's just a matter of adequately rounding and scaling the coefficients and then scaling the result back down. In practice "adequately" is a big word.

It seems fairly doable to take the Scipy output and write a little loop that scales the coefficients until they meet a certain error threshold and then calculate the number of bits needed and feed them into some template implementation.

I'm just thinking, surely I'm not the first one ever to design fixed point filters and people have come up with more optimal and automated approaches than doing it completely by hand?

Maybe some ungodly combo of Matlab toolboxes can do it? So far the filter toolbox and the C/HDL toolbox don't like what I'm doing though. fdesign.lowpass is not supported for code generation Also not a huge fan of Matlab, so if there is an FOSS solution, that would be preferable.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.