{ main program for calling real biquad IIR filter input, output data stored in memory ... no interrupts follows example system described in ADSP-21020 Users Manual "iirmem.asm" (requires file "iircoefs.dat") Analog Devices, Inc. DSP Applications P.O.Box 9106 Norwood, MA 02062 Christoph D. Cavigioli ... 25-Apr-1991 } .EXTERN cascaded_biquad, cascaded_biquad_init; .GLOBAL coefs, dline; .PRECISION=40; .ROUND_NEAREST; #define SAMPLES 300 #define SECTIONS 3 .SEGMENT /DM dm_data; .VAR inbuf[SAMPLES] = 1.0, 0.0; { input = unit impulse } .VAR outbuf[SAMPLES]; { ends up holding impulse response } .VAR dline[SECTIONS*2]; { w``, w`, NEXT w``, NEXT w`, ... } .ENDSEG; .SEGMENT /PM pm_data; .VAR coefs[SECTIONS*4]="iircoefs.dat"; { a12,a11,b12,b11,a22,a21,... } .ENDSEG; .SEGMENT /PM rst_svc; jump begin; .ENDSEG; .SEGMENT /PM pm_code; begin: pmwait=0x0021; { zero wait states for all of PM } dmwait=0x8421; { zero wait states for all of DM } b3=inbuf; l3=0; b4=outbuf; l4=0; l0=0; l1=0; l8=0; m1=1; m8=1; call cascaded_biquad_init (db); { zero the delay line } r0=SECTIONS; b0=dline; lcntr=SAMPLES, do filtering until lce; f8=dm(i3,1); call cascaded_biquad (db); { input=F8, output=F8 } b0=dline; b8=coefs; filtering: dm(i4,1)=f8; done: idle; .ENDSEG;