![](http://datasheet.mmic.net.cn/310000/ADSP-2109KP-80_datasheet_16243236/ADSP-2109KP-80_11.png)
ADSP-2104/ADSP-2109
REV. 0
–11–
Program Flow Instructions
DO <addr> [UNT IL term] ;
[IF cond] JUMP (Ix) ;
[IF cond] JUMP <addr>;
[IF cond] CALL (Ix) ;
[IF cond] CALL <addr>;
IF [NOT ] FLAG_IN
IF [NOT ] FLAG_IN
[IF cond] SET |RESET |T OGGLE FLAG_OUT [, ...] ;
[IF cond] RT S ;
[IF cond] RT I ;
IDLE [(n)] ;
Do Until Loop
J ump
Call Subroutine
JUMP <addr>;
CALL <addr>;
J ump/Call on Flag In Pin
Modify Flag Out Pin
Return from Subroutine
Return from Interrupt Service Routine
Idle
Miscellaneous Instructions
NOP ;
MODIFY (Ix , My);
[PUSH ST S] [, POP CNT R] [, POP PC] [, POP LOOP] ;
ENA|DIS
SEC_REG [, ...] ;
BIT _REV
AV_LAT CH
AR_SAT
M_MODE
T IMER
G_MODE
No Operation
Modify Address Register
Stack Control
Mode Control
Notation Conventions
Ix
My
<data>
<addr>
<exp>
<ALU>
<MAC>
<SHIFT >
cond
term
dreg
reg
;
,
[ ]
[, ...]
option1
|
option2
Index registers for indirect addressing
Modify registers for indirect addressing
Immediate data value
Immediate address value
Exponent (shift value) in shift immediate instructions (8-bit signed number)
Any ALU instruction (except divide)
Any multiply-accumulate instruction
Any shift instruction (except shift immediate)
Condition code for conditional instruction
T ermination code for DO UNT IL loop
Data register (of ALU, MAC, or Shifter)
Any register (including dregs)
A semicolon terminates the instruction
Commas separate multiple operations of a single instruction
Optional part of instruction
Optional, multiple operations of an instruction
List of options; choose one.
Assembly Code E xample
T he following example is a code fragment that performs the filter tap update for an adaptive filter based on a least-mean-squared
algorithm. Notice that the computations in the instructions are written like algebraic equations.
MF=MX0*MY1(RND), MX0=DM(I2,M1);
MR=MX0*MF(RND), AY0=PM(I6,M5);
DO adapt UNTIL CE;
AR=MR1+AY0, MX0=DM(I2,M1), AY0=PM(I6,M7);
PM(I6,M6)=AR, MR=MX0*MF(RND);
{MF=error*beta}
adapt:
MODIFY(I2,M3);
MODIFY(I6,M7);
{Point to oldest data}
{Point to start of data}