Extract some code from the big ptach D111337. This patch
contains some utility functions from the FIRBuidler.
This patch is part of the upstreaming effort from fir-dev branch.
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>