INSTRUCTION |
INSTRUCTION AND PARAMETERS |
PARAMETER DESCRIPTION |
OPERATION DESCRIPTION |
MAC |
MAC Wm*Wn, Acc |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator |
Values of the Wm and Wn registers are multiplied and added to the current value in the operating accumulator (A or B) |
MAC |
MAC Wm*Wn, Acc, [Wx], Wxd, [Wy], Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
Wy – W10 or W11
Wyd – W6 or W7 |
Values of the Wm and Wn registers are multiplied and added to the current value in the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register. |
MAC |
MAC Wm*Wn, Acc, [Wx]+=kx, Wxd, [Wy]+=ky, Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
kx – (-6,-4,-2, 2, 4, 6)
Wy – W10 or W11
Wyd – W6 or W7
ky – (-6,-4,-2, 2, 4, 6) |
Values of the Wm and Wn registers are multiplied and added to the current value in the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register, the Wx register value is decreased by kx, the Wy register value is decreased by ky. |
MOVSAC |
MOVSAC Acc[Wx], Wxd, [Wy], Wyd, AWB |
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
Wy – W10 or W11
Wyd – W6 or W7
AWB – W13 (Acc write-back) |
The value from the operating accumulator is saved in the register W13 (AWB - accumulator write back), from the address pointed by the register Wx the value is read and written to the register Wxd, from the address pointed by the register Wy the value is read and written to the register Wyd. |
MPY |
MPY Wm*Wn, Acc |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator |
The values in the Wm and Wn registers are multiplied and written to the operating accumulator. |
MPY |
MPY Wm*Wn, Acc [Wx], Wxd, [Wy], Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
Wy – W10 or W11
Wyd – W6 or W7 |
The values of the Wm and Wn registers are muliplied and written to the accumulator (A or B), from the address pointed by the register Wx the value is read and written to the register Wxd, from the address pointed by the register Wy the value is read and written to the register Wyd. |
MPY |
MPY Wm*Wn, Acc [Wx]+=kx, Wxd, [Wy]+=ky, Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
kx – (-6,-4,-2, 2, 4, 6)
Wy – W10 or W11
Wyd – W6 or W7
ky – (-6,-4,-2, 2, 4, 6) |
The values of the Wm and Wn registers are multiplied and written to the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register, the Wx register value is increased by kx, the Wy register value is increased by ky. |
MPY |
MPY Wm*Wn, Acc[Wx]-=kx, Wxd, [Wy]-=ky, Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
kx – (-6,-4,-2, 2, 4, 6)
Wy – W10 or W11
Wyd – W6 or W7
ky – (-6,-4,-2, 2, 4, 6) |
The values of the Wm and Wn registers are multiplied and written to the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register, the Wx register value is decreased by kx, the Wy register value is decreased by ky. |
MSC |
MSC Wm*Wn, Acc[Wx], Wxd, [Wy], Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
Wy – W10 or W11
Wyd – W6 or W7 |
The values of the Wm and Wn registers are multiplied and subtracted from the curent value in the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register. |
MSC |
MSC Wm*Wn, Acc[Wx]+=kx, Wxd, [Wy]+=ky, Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
kx – (-6,-4,-2, 2, 4, 6)
Wy – W10 or W11
Wyd – W6 or W7
ky – (-6,-4,-2, 2, 4, 6) |
The values of the Wm and Wn registers are multiplied and subtracted from the current value in the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register, the Wx register value is increased by kx, the Wy register value is increased by ky. |
MSC |
MSC Wm*Wn, Acc[Wx]-=kx, Wxd, [Wy]-=ky, Wyd |
Wm – W4 or W5
Wn – W6 or W7
Acc – A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
kx – (-6,-4,-2, 2, 4, 6)
Wy – W10 or W11
Wyd – W6 or W7
ky – (-6,-4,-2, 2, 4, 6) |
The values of the Wm and Wn registers are multiplied and subtracted from the current value in the operating accumulator (A or B), from the address pointed by the Wx register the value is read and written to the Wxd register, from the address pointed by the Wy register the value is read and written to the Wyd register, the Wx register value is decreased by kx, the Wy register value is decreased by ky. |
NEG |
NEG Acc |
Acc – A or B (operating accumulator) |
Acc ← -Acc, the sign of the current value in the accumulator is changed, analogous to the multiplying of the value in the operating accumulator by –1. |
REPEAT |
REPEAT #lit14 |
#lit14 – 14-bit unsigned value (0...16383) |
The instruction following REPEAT will be executed #lit14+1 times. Even though this is not a DSP instruction, it is very often used when using DSP instructions. |
REPEAT |
REPEAT Wn |
Wn – W0...W15 |
The instruction following REPEAT will be executed Wn+1 times. Even though this is not a DSP instruction, it is very often used when using DSP instructions. |
SAC |
SAC Acc, {#Slit4,} Wd |
Acc – A or B accumulator
{#Slit4,} – optional 4-bit constant
Wd – W0...W15 |
If the optional 4-bit constant is specified, the accumulator value is shifted to the right for the positive value of the constant or to the left if the constant is negative. Then, the obtained value is loaded to Wd. |
SAC |
SAC Acc, {Slit4,} [Wd] |
Acc - A or B accumulator
{#Slit4,} – optional 4-bit constant
Wd – W0...W15 |
If the optional 4-bit constant is specified, the accumulator value is shifted to the right for the positive value of the constant or to the left if the constant is negative. Then, the obtained value is loaded to the address in the data memory pointed by the Wd register. |
SAC |
SAC Acc, {Slit4,} [Wd++] |
Acc - A or B accumulator
{#Slit4,} – optional 4-bit constant
Wd – W0...W15 |
If the optional 4-bit constant is specified, the accumulator value is shifted to the right for the positive value of the constant or to the left if the constant is negative. Then, the obtained value is loaded to the address in the data memory pointed by the Wd register. After memory write, the value of the register Wd is incremented by 2. |
SAC |
SAC Acc, {Slit4,} [Wd -] |
Acc - A or B accumulator
{#Slit4,} – optional 4-bit constant
Wd – W0...W15 |
If the optional 4-bit constant is specified, the accumulator value is shifted to the right for the positive value of the constant or to the left if the constant is negative. Then, the obtained value is loaded to the address in the data memory pointed by the Wd register. After memory write, the value of the register Wd is decremented by 2. |
SAC |
SAC Acc, {Slit4,} [++Wd] |
Acc - A or B accumulator
{#Slit4,} – optional 4-bit constant
Wd – W0...W15 |
If the optional 4-bit constant is specified, the accumulator value is shifted to the right for the positive value of the constant or to the left if the constant is negative. Then, the value of the register Wd is incremented by 2 and the value obtained by shifting is saved in the address pointed by the Wd register. |
SAC |
SAC Acc, {Slit4}, [--Wd] |
Acc - A or B accumulator
{#Slit4,} – optional 4-bit constant
Wd – W0...W15 |
If the optional 4-bit constant is specified, the accumulator value is shifted to the right for the positive value of the constant or to the left if the constant is negative. Then, the value of the register Wd is decremented by 2 and the value obtained by shifting is saved in the address pointed by the Wd register. |
SAC.R |
The same as for SAC |
The same as for SAC |
The same as for the SAC instruction except that the value from the accumulator is rounded by the conventional or convergent mode. |
SFTAC |
SFTAC Acc, #Slit6 |
#Slit6 – 6-bit constant |
Shift the value in the accumulator by #Slit6 bits. If the constant is positive, shifting is to the right, otherwise to the left. |
SFTAC |
SFTAC Acc, Wd |
Wd – W0...W15 |
Shift the value in the accumulator by Wd bits. If the register Wd is positive, shifting is to the right, otherwise to the left. |
CLR |
CLR Acc |
Acc - A or B accumulator |
The value in the operating accumulator is set to zero. |
CLR |
CLR Acc, [Wx], Wxd, [Wy], Wyd |
Acc - A or B accumulator
Wx – W8 or W9
Wxd – W4 or W5
Wy – W10 or W11
Wyd – W6 or W7 |
The value in the operating accumulator is set to zero. From the address in the data memory pointed by Wx the value is read and written to the register Wxd. From the address in the data memory pointed by Wy the value is read and written to the register Wyd. |
CLR |
CLR Acc, [Wx]+=kx, Wxd, [Wy]+=ky, Wyd |
Acc – A or B accumulator Wx – W8 or W9
Wxd – W4 or W5
kx – (-6,-4,-2, 2, 4, 6)
Wy – W10 or W11
Wyd – W6 or W7
ky – (-6,-4,-2, 2, 4, 6) |
The value in the operating accumulator is set to zero. From the address in the data memory pointed by Wx the value is read and written to the register Wxd. From the address in the data memory pointed by Wy the value is read and written to the register Wyd. The Wx register value is increased by kx, the Wy register value is increased by ky. |