ADSP-2171/ADSP-2172/ADSP-2173
Example Code
The following example is a code fragment that performs the
filter tap update for an adaptive (least-mean-squared algorithm)
filter. Notice that the computations in the instructions are
written like algebraic equations.
MF=MX0*MY1 (RND), MX0=DM (I2,M1); /* MF=error*beta */
MR=MX0*MF (RND), AY0=PM (I6,MS);
DO adapt UNTIL CE;
AR=MR1 + AY0, MX0=DM (I2,M1), AY0=PM (I6,M7);
adapt: PM(I6,M6) =AR, MR=MX0*MF (RND);
MODIFY (I2, M3);
/* Point to oldest data */
MODIFY (I6, M7);
/* Point to start of data */
Interrupt Enable
The ADSP-217x supports an interrupt enable instruction. Inter-
rupts are enabled by default at reset. The instruction source
code is specified as follows:
Syntax:
ENA INTS;
Description: Executing the ENA INTS instruction allows all
unmasked interrupts to be serviced again.
Interrupt Disable
The ADSP-217x supports an interrupt disable instruction. The
instruction source code is specified as follows:
Syntax:
DIS INTS;
Description: Reset enables interrupt servicing. Executing the
DIS INTS instruction causes all interrupts to be
masked without changing the contents of the
IMASK register. Disabling interrupts does not
affect the autobuffer circuitry, which will operate
normally whether or not interrupts are enabled.
The disable interrupt instruction masks all user
interrupts including the powerdown interrupt.
–16–
REV. A