5.5.7 FIRLattice

Description

FIRLattice uses a lattice structure implementation to apply an FIR filter to the sequence of source samples. It then places the results in the sequence of the destination samples and updates the delay values.

Prototype

fractional* FIRLattice (int numSamps, fractional* dstSamps, fractional* srcSamps, FIRStruct* filter);

Arguments

Parameters

Description

numSamps

Number of input samples to filter (also N; with N being multiple of R)

dstSamps

Pointer to the destination samples (also y)

srcSamps

Pointer to the source samples (also x)

filter

Pointer to the FIRStruct filter structure

Return

Pointer to the base address of the destination sample.

Remarks

Number of the filter coefficients is M.

Coefficients, h[m], defined in 0 ≤ m < M, are not implemented as a circular modulo buffer.

Delay, d[m], defined in 0 ≤ m < M, are not implemented as a circular modulo buffer.

Source samples, x[n], defined in 0 ≤ n < N.

Destination samples, y[n], defined in 0 ≤ n < N.

(See also FIRStructFIRStructInit and FIRDelayInit.)

Source File

  • firlatt_aa.s

Cycle counts for PIC32A:

Source Vector SizeCycles if coefficients in X-memCycles if coefficients in P-mem

32

6410

10154

64

12782

20266

128

25518

40490

256

50990

80938

512

101934

161834

1024

203822

323626

2048

407597

647210

(*All values with numCoeffs = 32)

System resource usage

  • W0…W7 - used, not restored
  • W8…W10 - saved, used, restored
  • ACCA - used, not restored
  • CORCON - saved, used, restored
  • REPEAT instruction(s) usage – None