ADSP-SC58x/2158x IIR Accelerator: Example Code

Attached zip file contains the example code for using the IIR accelerator module.

  1. IIR_Accelerator_Two_Channels_Core1: This code shows how to use IIR accelerator to filter two input buffers (channels):
    • Channel 1: BIQUADS = 6, WINDOW SIZE = 1024
    • Channel 2: BIQUADS = 4, WINDOW SIZE = 512
  2. IIR_Accelerator_Two_Channels_Core0: This code can be run on ARM to enable the SHARC core.
  3. iir.m: This MATLAB script can be used to generate data for input, coefficients, expected output buffers.
IIRExampleCode.zip
Parents
  • I think there is a bug in this code example.

    In the file main.c where the TCB's are filled with the data, a value is added as :

    IIRA_TCB2[0]=((uint32_t)(IIRA_TCB1+12)>>2)|0xA000000; //CP

    This is a pointer to the last value of the next TCB block.  Since the TCB block contains 12 elements of type uint32_t, wich are 4 byte words I think the offset should be 12 words, not 12 bytes.  The code should be :

    IIRA_TCB2[0]=((uint32_t)(IIRA_TCB1+(12*4))>>2)|0xA000000 // CP.

    Also for the call to the IIRA_Init function, the second parameter should become (((uint32_t)(IIRA_TCB1+(12*4))>>2)|0xA000000).

    This behaviour will change if the IIR call is implemented in a continous circular buffer, where the TCB's are chained.

    Am i right ?

    Br,

    Thierry

  • The IIRA_TCB variables are defined as 32 bit integer arrays, so the IIRA_TCB + 12 is interpreted as memory location of 12 uint32_t offset from IIRA_TCB 

Reply Children
No Data