我正在ARM9处理器上实现FIR滤波器,并尝试使用SMLAL指令.
最初我实现了以下过滤器并且它完美地工作,除了这种方法使用太多的处理能力在我们的应用程序中使用.
uint32_t DDPDataAcq::filterSample_8k(uint32_t sample)
{
// This routine is based on the fir_double_z routine outline by Grant R Griffin
// - www.dspguru.com/sw/opendsp/alglib.htm
int i = 0;
int64_t accum = 0;
const int32_t *p_h = hCoeff_8K;
const int32_t *p_z = zOut_8K + filterState_8K;
/* Cast the sample to a signed 32 bit int
* We need to preserve the signdness of the number, so if the 24 bit
* sample is negative we need to move the sign bit up …Run Code Online (Sandbox Code Playgroud)