?? cfir_t.c
字號:
//=============================================================================
// Filename: cfir_t.c
// Version: 0.001
// Description: test for complex block finite impulse response filter (raw)
//--------------------------------------------------------------------------
// Revision History:
// 0.001, R. Piedra, 06/1/97, R. Piedra - original release
//=============================================================================
#include <math.h>
#include <stdio.h>
#include <tms320.h>
#include <dsplib.h>
#include "test.h"
#define NR NX
short i;
short nx = NX;
short eflag1=-1; // error flag (-1: no error; else error)
short eflag2=-1; //
DATA r[2*NR];
DATA *dbptr = &db[0];
FILE *fp;
main()
{
//clear
for (i=0;i<2*NR;i++) r[i] =0;
for (i=0;i<2*NH;i++) db[i]=0;
// compute using dynamic scaling to avoid overflow
cfir(x,h,r,&dbptr,NH,NX);
// test
eflag1 = test(r, rtest, NH, MAXERROR);
// If NX > = 4 try to use db to point to correct location in buffer
dbptr = &db[0];
for (i=0;i<2*NR;i++) r[i] =0;
for (i=0;i<2*NH;i++) db[i]=0;
if (NX >= 4)
{
cfir(x,h,r,&dbptr,NH,NX/4);
cfir(&x[(2*nx)/4],h,&r[(2*nx)/4],&dbptr,NH,NX/4);
cfir(&x[nx],h,&r[nx],&dbptr,NH,NX/4);
cfir(&x[6*nx/4],h,&r[6*nx/4],&dbptr,NH,NX/4);
}
// test
eflag2 = test(r, rtest, NH, MAXERROR);
return;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -