00001 /*----------------------------------------------------------------------------- 00002 * Copyright (C) 2011 ARM Limited. All rights reserved. 00003 * 00004 * $Date: 15. December 2011 00005 * $Revision: V2.0.0 00006 * 00007 * Project: Cortex-R DSP Library 00008 * Title: arm_iir_lattice_init_f32.c 00009 * 00010 * Description: Floating-point IIR lattice filter initialization function. 00011 * 00012 * Target Processor: Cortex-R4/R5 00013 * 00014 * Version 1.0.0 2011/03/08 00015 * Alpha release. 00016 * 00017 * Version 1.0.1 2011/09/30 00018 * Beta release. 00019 * 00020 * Version 2.0.0 2011/12/15 00021 * Final release. 00022 * 00023 * ---------------------------------------------------------------------------*/ 00024 #include "arm_math.h" 00025 00046 void arm_iir_lattice_init_f32( 00047 arm_iir_lattice_instance_f32 * S, 00048 uint16_t numStages, 00049 float32_t * pkCoeffs, 00050 float32_t * pvCoeffs, 00051 float32_t * pState, 00052 uint32_t blockSize) 00053 { 00054 /* Assign filter taps */ 00055 S->numStages = numStages; 00056 00057 /* Assign reflection coefficient pointer */ 00058 S->pkCoeffs = pkCoeffs; 00059 00060 /* Assign ladder coefficient pointer */ 00061 S->pvCoeffs = pvCoeffs; 00062 00063 /* Clear state buffer and size is always blockSize + numStages */ 00064 memset(pState, 0, (numStages + blockSize) * sizeof(float32_t)); 00065 00066 /* Assign state pointer */ 00067 S->pState = pState; 00068 00069 00070 } 00071