AnsweredAssumed Answered

ADSP21489 Multichannel IIR Accelerator trouble

Question asked by rodher on Feb 5, 2016
Latest reply on Feb 9, 2016 by rodher

Hi, everyone!

 

I recently bought an ADSP-21489 evaluation board and I'm currently playing around with it and progressively building a piece of code to get my project done.

 

In the project I need multichannel filtering, so I'm trying to get this done by using the IIR Accelerator. However, I'm unable to do so. I've checked out the "Talkthrough_IIR_Accelerator" example from the VisualDSP++ examples folder for my processor, and if I don't change the code it works. If I change the low pass coefficients to high pass coefficients it still works.

 

Problems arise when I try to configure one channel to be high-pass filtered and the other to be low-pass filtered. Then it compiles perfectly, but only one of the channels is filtered, while the other is just not output. These are the code changes:

 

IIR_Accelerator.c

 

// TCB Initialization

 

int IIR_TCB_RIGHT[13]={

      0, // CP = Chain pointer register

      21, // CC/CL = Coefficient buffer length register

      1, // CM = Coefficient modifier register

      coeffs_low_pass, // CI  = Cofficient index refister

      output_right, // OB  = Ouput data base register

      512, // OL/OC = Output buffer length register

      1, // OM = Output modifier register

      output_right, // OI = Output data index register

      input_right, // IB = Input data base register

      512, // IL/IC  = Input buffer length register

      1, // IM = Input buffer modifier register

      input_right, // II = Input data index register

      2|(511<<14) // IIRCTL2 = Channel control register, no of biquads = 3, WINDOW SIZE=512

  };

 

int IIR_TCB_LEFT[13]={

 

      IIR_TCB_RIGHT+12, // CP = Chain pointer register

      21, // CC/CL = Coefficient buffer length register

      1, // CM = Coefficient modifier register

      coeffs_high_pass, // CI  = Cofficient index refister

      output_left, // OB  = Ouput data base register

      512, // OL/OC = Output buffer length register

      1, // OM = Output modifier register

      output_left, // OI = Output data index register

      input_left, // IB = Input data base register

      512, // IL/IC  = Input buffer length register

      1, // IM = Input buffer modifier register

      input_left, // II = Input data index register

      2|(511<<14) // IIRCTL2 = Channel control register, no of biquads = 3, WINDOW SIZE=512

 

  };

 

process_audio.c

 

float coeffs_low_pass[7*NUM_SECTIONS+1] = {

            #include "coeffs_low_pass.dat"

    } ;

 

float coeffs_high_pass[7*NUM_SECTIONS+1] = {

            #include "coeffs_high_pass.dat"

    } ;

 

So in the example above, right channel is low-filtered and left channel is not output.

 

I've read the IIR Accelerator Chapter from the Hardware Reference manual for the DSP and I haven't found what I'm doing wrong. Also, I've tried the Expert Code Generator for the IIR Accelerator and there are no meaningful differences between the generated code and the modified code.

 

I hope that someone can come up with a solution because I've really got stuck.

 

Please, find attached the full modified code.

 

Thank you in advance, guys!

Outcomes