|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 cjsb37 于 2013-4-29 09:01 编辑
File Name: fir_032101.zip
File Contents: read_me.txt
filter.h
fir.asm
fir.dxe
fir_stall.txt
mds_def.h
tfilter.h
tfir.c
tfir.h
Module Name: Finite Impulse response filter
Function Name: __fir
Description: This function performs FIR filter operation on given input.
Operands: R0- Address of input vector, R1-Address of output vector,
R2- Number of input elements
Filter structure is on stack.
Prototype:
void fir(const fract16 x[],fract16 y[],int n,fir_state_fr16 *s);
x[] - input array
y[] - output array
n - number of input samples(even)
s - Structure of type fir_state_fr16:
{
fract16 *h, // filter coefficients
fract16 *d, // start of delay line
int k, // no. of coefficients
} fir_state_fr16;
Registers used :
R0, R1, R2, R3, R3
I0 -> Address of delay line (used for updating the delay line)
I1 -> Address of delay line (used for fetching the delay line data)
I2 -> Address of filter coeff. h0, h1 , ... , hn-1
I3 -> Address of output array y[]
P0 -> Address of input array x[]
P1, P2
Computation Time:
Total execution time for Number of Samples= Ni & number of coefficients = Nc
Kernal Cycle Count: (Ni/2){4 + ((Nc/2-1)*2)}
Initialization: 36 + 5
For Ni=256 & Nc=8 Total execution time = 1321 cycles
FIR filter code size : 146 bytes
FIR filter core size : 44 bytes
|
|