ST10 FAMILY PROGRAMMING MANUAL
149/172
CoMACM(R)su(-)
Mix. Multiply-Accumulate
Parallel Data Move & Optional Round
Group
Multiply/Multiply-Accumulate Instructions
Syntax
CoMACMsu
op1, op2
Operation
(tmp) <--
((op1))*((op2))
(ACC)
<-- (ACC) + (tmp)
((IDX
i
(-
⊗
))) <--
((IDX
i
))
Syntax
CoMACMsu
op1, op2, rnd
Operation
(tmp) <--
((op1))*((op2))
(ACC)
<-- (ACC) + (tmp) + 00 0000 8000
h
(MAL) <--
0
((IDX
i
(-
⊗
))) <--
((IDX
i
))
Syntax
CoMACMsu-
op1, op2
Operation
(tmp) <--
((op1))*((op2))
(ACC)
<-- (ACC) - (tmp)
((IDX
i
(-
⊗
))) <--
((IDX
i
))
Syntax
CoMACMRsu
op1, op2
Operation
(tmp) <--
((op1))*((op2))
(ACC)
<-- (tmp) - (ACC)
((IDX
i
(-
⊗
))) <--
((IDX
i
))
Syntax
CoMACMRsu
op1, op2, rnd
Operation
(tmp) <--
((op1))*((op2))
(ACC)
<-- (tmp) - (ACC) + 00 0000 8000
h
(MAL) <--
0
((IDX
i
(-
⊗
))) <--
((IDX
i
))
Data Types
DOUBLE WORD
Result
40-bit signed value
Description
Multiplies the two signed 16-bit source operands “op1” and “op2”. The obtained signed 32-bit product is
first sign-extended, it is then optionally negated prior being added/subtracted to/from the 40-bit ACC regis-
ter content, finally the obtained result is optionally rounded before being stored in the 40-bit ACC register.
“-” option is used to negate the specified product, “R” option is used to negate the accumulator content,
and finally “rnd” option is used to round the result using two’s complement rounding. The default sign
option is “+” and the default round option is “no round”. When “rnd” option is used, MAL register is automat-
ically cleared. Note that “rnd” and “-” are exclusive as well as “-” and “R”. This instruction might be repeated
and performs two parallel memory reads.
In parallel to the arithmetic operation and to the two parallel reads, the data pointed to by IDX
i
overwrites
another data located in memory (DPRAM). The address of the overwritten data depends on the operation
executed on IDX
i
, as illustrated by the following table:
Addressing Mode
Overwritten Address
[IDX
i
]
(no change)
[IDX
i
+]
(IDX
i
) - 2
[IDX
i
-]
(IDX
i
) + 2
[IDX
i
+QX
j
]
(IDX
i
) - (QX
j
)
[IDX
i
- QX
j
]
(IDX
i
) + (QX
j
)
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...