Texas Instruments TMS320C64X Manual do Utilizador Página 30

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 169
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 29
DSP_firlms2
4-2
4.1 Adaptive Filtering
LMS FIR
DSP_firlms2
Function long DSP_firlms2(short * restrict h, const short * restrict x, short b, int nh)
Arguments h[nh] Coefficient Array
x[nh+1] Input Array
b Error from previous FIR
nh Number of coefficients. Must be multiple of 4.
return long Return value
Description The Least Mean Square Adaptive Filter computes an update of all nh
coefficients by adding the weighted error times the inputs to the original
coefficients. The input array includes the last nh inputs followed by a new
single sample input. The coefficient array includes nh coefficients.
Algorithm This is the C equivalent of the assembly code without restrictions. Note that
the assembly code is hand optimized and restrictions may apply.
long DSP_firlms2(short h[ ],short x[ ], short b,
int nh)
{
int i;
long r = 0;
for (i = 0; i < nh; i++) {
h[i] += (x[i] * b) >> 15;
r += x[i + 1] * h[i];
}
return r;
}
Special Requirements
- This routine assumes 16-bit input and output.
- The number of coefficients nh must be a multiple of 4.
Vista de página 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 168 169

Comentários a estes Manuais

Sem comentários