📄 fir_blk_test.asm
字号:
/**************************************************************
File Name: fir_blk_test.asm
Date Modified: 1/5/99 RFG
7/11/00 PPG
Purpose: Program to call fir_blk.asm
**************************************************************/
#include "def21160.h"
#define TAPS 64 /* length of filter */
#define N 128 /* number of samples */
.extern fir;
/* DM data */
.section/dm seg_dmda;
.ALIGN 2;
.var dline[TAPS+1]; /* delay line compensate for circ buffer, see comments in block_fir.asm */
.ALIGN 2;
.var input[N] = "input.dat"; /* array of samples */
/* PM data */
.section/dm seg_pmda;
.ALIGN 2;
.var coeffs[TAPS] = "fircoeffs.dat";
.ALIGN 2;
.var output[N+2]; /* Output array. The first and last entries are dummy */
/* entries to allow an optimization in the fir.*/
/* PM interrupt vector code */
.section/pm seg_rth;
Reserved_1: rti; nop; nop; nop;
Chip_Reset: idle; jump start; nop; nop;
/* program memory code */
.section/pm seg_pmco;
/* Initialization code */
start:
b0 = dline;
l0 = @dline-1;
b1 = input;
l1 = 0;
b8 = coeffs;
l8 = @coeffs;
b9 = output;
l9 = 0;
m0=0;
m1=1;
m2=-1;
m3=2;
m9=2;
m10=1;
s0=0;
r1=TAPS/2;
call fir (db);
r2=N;
r3=(TAPS-6)/2;
/* Terminate and wait */
wait1: jump wait1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -