
3.0 Functional Description
(Continued)
Operation:
à
aligned real X,Y;
extended Z;
for (n
4
0; n
k
LENG; n
00
)
à
Z
[
2n
] 4
(extended) (Z
[
2n
] 0
X
[
n
]
.low *
Y
[
n
]
.low) ;
Z
[
2n
0
1
] 4
(extended) (Z
[
2n
0
1
] 0
X
[
n
]
.high
* Y
[
n
]
.high) ;
ó
ó
Note:
When PARAM.CLR is set to ‘‘1’’, only multiplication is performed,
without addition. When PARAM.SUB is set to ‘‘1’’, the ‘‘
a
’’ sign is
replaced by a ‘‘
b
’’ sign.
VCMADDVector Complex Multiply and Add
The VCMAD instruction multiplies the corresponding ele-
ments of the X and Y complex vectors and adds or sub-
tracts the result to the complex vector Z. This result is
placed in the Z output vector.
Syntax:
EXEC VCMAD
15
11 10
0
10000
100 1110 0000
Operation:
à
complex X,Y,Z;
for (n
4
0; n
k
LENG; n
00
)
à
Z
[
n
] 4
(complex) (Z
[
n
] 0
X
[
n
]
* Y
[
n
]
);
ó
ó
Note:
When PARAM.COJ is set to ‘‘1’’, X
[
n
]
is multiplied by the conjugate
of Y
[
n
]
. When PARAM.CLR is set to ‘‘1’’, only multiplication is per-
formed, without addition. When PARAM.SUB is set to ‘‘1’’, the ‘‘
a
’’
sign is replaced by a ‘‘
b
’’ sign.
3.4.5.13 Clipping and Min/Max Instructions
VARABSDVector Aligned Real Absolute Value
The VARABS instruction computes the absolute value of
each element in the real vector X and places the result in
the corresponding place in the Y output vector.
Syntax:
EXEC VARABS
15
11 10
0
10000
100 0001 1111
Operation:
à
aligned real X,Z;
for (n
4
0; n
k
LENG; n
00
)
à
Z
[
n
]
.low
4
abs (X
[
n
]
.low);
Z
[
n
]
.high
4
abs (X
[
n
]
.high);
ó
ó
Note:
There is no representation for the absolute value of 0x8000. Whenev-
er an absolute value of 0x8000 is needed, OVF.SAT is set to ‘‘1’’, and
the maximum positive number 0x7FFF is returned.
VARMINDVector Aligned Real Minimum
The VARMIN instruction compares corresponding elements
of the X and Y real vectors, and writes the smaller of the two
in the corresponding place in the Z integer vector.
Syntax:
EXEC VARMIN
15
11 10
0
10000
100 0101 1111
Operation:
à
aligned real X,Y,Z;
for (n
4
0; n
k
LENG; n
00
)
à
Z
[
n
]
.low
4
min (X
[
n
]
.low ,Y
[
n
]
.low);
Z
[
n
]
.high
4
min (X
[
n
]
.high ,Y
[
n
]
.high);
ó
ó
VARMAXDVector Aligned Real Maximum
The VARMAX instruction compares corresponding ele-
ments of the X and Y real vectors, and writes the larger of
the two in the corresponding place in the Z integer vector.
Syntax:
EXEC VARMAX
15
11 10
0
10000
100 0110 0110
Operation:
à
aligned real X,Y,Z;
for (n
4
0; n
k
LENG; n
00
)
à
Z
[
n
]
.low
4
max (X
[
n
]
.low , Y
[
n
]
.low);
Z
[
n
]
.high
4
max (X
[
n
]
.high , Y
[
n
]
.high);
ó
ó
VRFMINDVector Real Find Minimum
The VRFMIN instruction scans the X real vector and returns
the address of the element with the smallest value. The
resulting address is placed in Z
[
0
]
.
Syntax:
EXEC VRFMIN
15
11 10
0
10000
100 0110 1101
52