This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C5507 DSPLIB IIR32

Using dsplib_2.40 for TMS320C5507 family. Double precision iir32. Does it really work? When I process data with single precision routine works fine, double basically kills the signal entirely. Note, there is significant confusion on coefficient location. Library has one answer, example provided a second answer, source code two additional. I think the library was correct, B2,B1,B0,A2,A1

thanks -emil


  • Hi Emil,

    Thanks for pointing this out.  I have asked our Software team to follow up on it.

    Best regards, Vishal

  • Emil,

    I agree there is conflicting information in DSPLIB concerning the organization of the cofficients. The saw the organization described differently in the assembly source code, the test header files, and SPRU422J. There correct organization is described in SPRU422J.

    The iir32() routine works correctly for me on in a C55x Rev. 2 cycle accurate simulator and on a VC5505 (Rev. 3 CPU) with both the small and large memory model DSPLIB libraries. In order to determine this, I performed the following tests:

    1) Checked tests 1-5 packaged with DSPLIB (see dsplib\EXAMPLES\iir32 directory) pass on DSP target.

    2) Performed filtering in Matlab on test vectors from tests 1-5.

    - Wrote Matlab script to perform IIR filtering as performed in iir32(), i.e. biquads in Direct Form II.

    - Extracted input, coefficient, and reference output vectors from tests 1-5.

    - Executed Matlab IIR filtering routine on extracted vectors.

    - Matlab output is bit-accurate with reference vectors obtained from tests 1-5 (used truncation in Matlab for quantization of floating-point output).

    3) Performed filtering in Matlab and on DSP target for new test vectors generated in Matlab.

    - Wrote Matlab script to generate test vectors for DSP target code: (1) coefficients for multiple biquads; (2) input vectors; and (3) reference output vectors.

    - Biquads are Butterworth filters. Ensured no overflows at the summing junctions of any biquad using fixed L1-norm scaling of the biquad coefficients. More information on this and other techniques for avoiding overflow in fixed-point biquads can be obtained in SPRA509.pdf.

    - Input vector can be an impulse, sinusoidal data, or uniformly distributed noise.

    - Filtered input vector in Matlab to generate reference output vector for DSP target.

    - Filtered new test vectors on DSP target.

    - Compared reference vector generated in Matlab with DSP output on DSP target. Matlab and DSP target output match to within tolerance specified in DSPLIB (10 is maximum allowed error). In the cases that I visually examined, I noticed about 1-2 LSBs of difference.

    I've attached the Matlab script mentioned above in 3).

    Please let me know ifyou have any concerns.

    Thanks and regards, Frank