在VDSP++的环境下程序已经实现,但是到了CCES下,把中断初始化函数修改了,还是无法正确配置中断,直接返回IIR的中断初始化失败,请问CCES下怎么使用IIR加速器?
代码如下:
/* This code has the TCBS, initialization routines, and the DMA completion ISR for the IIR accelerator */
#include <services\int\adi_int.h>
#include "ADDS_21489_EzKit.h"
#include "IIR_Accelerator.h"
void Init_IIR(void);
void ACC_ISR();
float input_left[NUM_SAMPLES];
float input_right[NUM_SAMPLES];
float output_left[NUM_SAMPLES];
float output_right[NUM_SAMPLES];
float coeffs_low_pass[7*NUM_SECTIONS+1] = {
#include "lowpass_200Hz.dat"
} ;
float coeffs_high_pass[];
volatile int acc_over;
ad1939_float_data fBlockA;
// TCB Initialization
int IIR_TCB_RIGHT[13]={
0, // CP = Chain pointer register
21, // CC/CL = Coefficient buffer length register
1, // CM = Coefficient modifier register
(int)coeffs_low_pass, // CI = Cofficient index refister
(int)fBlockA.Tx_R1, // OB = Ouput data base register
NUM_SAMPLES, // OL/OC = Output buffer length register
1, // OM = Output modifier register
(int)fBlockA.Tx_R1, // OI = Output data index register
(int)fBlockA.Rx_R1, // IB = Input data base register
NUM_SAMPLES, // IL/IC = Input buffer length register
1, // IM = Input buffer modifier register
(int)fBlockA.Rx_R1, // II = Input data index register
2|(383<<14) // IIRCTL2 = Channel control register, no of biquads = 3, WINDOW SIZE=512
};
int IIR_TCB_LEFT[13]={
(int)IIR_TCB_RIGHT+12, // CP = Chain pointer register
21, // CC/CL = Coefficient buffer length register
1, // CM = Coefficient modifier register
(int)coeffs_low_pass, // CI = Cofficient index refister
(int)fBlockA.Tx_L1, // OB = Ouput data base register
NUM_SAMPLES, // OL/OC = Output buffer length register
1, // OM = Output modifier register
(int)fBlockA.Tx_L1, // OI = Output data index register
(int)fBlockA.Rx_L1, // IB = Input data base register
NUM_SAMPLES, // IL/IC = Input buffer length register
1, // IM = Input buffer modifier register
(int)fBlockA.Rx_L1, // II = Input data index register
2|(383<<14) // IIRCTL2 = Channel control register, no of biquads = 3, WINDOW SIZE=512
};