Toshiba H1 Series Data Book page 634

32bit micro controller tlcs-900/h1 series
Table of Contents

Advertisement

(d) Sign mode
Both multiply-accumulate and multiply-subtract operations can be executed in unsigned
or signed mode.
In signed mode, the MACMA, MACMB, and MACOR registers become signed registers,
and the most significant bit is treated as the sign bit and the data set in each register is
treated as a two's complement value. Table 3.26.1 shows the range of values that can be
represented in each sign mode.
Table 3.26.1 Data Range in Unsigned/Signed Mode
Unsigned
Signed
Use signed mode when the values to be set in the MACMA and MACMB registers are
signed (two's complement) data. Even in unsigned mode it is possible to set signed (two's
complement) data in the MACOR register to perform additions and subtractions in signed
mode.
(2)
Calculation start trigger
As a trigger to start calculation, writing to the MACMA, MACMB or MACOR register or
soft start (MACCR<MOPST>=1) can be selected in MACCR<MSTTG2:0>.
(3)
Overflow flag
When an overflow occurs in the calculation result (see Table 3.26.2), MACCR<MOVF> is set
to "1". Once an overflow occurs, MACCR<MOVF> is held at "1" regardless of subsequent
calculation results. Since the overflow flag is not automatically cleared by a read operation, it
is necessary to write "0" to clear this flag.
Sign Mode
Signed
Unsigned
MACMA, MACMB Registers
0 ∼ 2
32
−1
−2
31
∼ +2
31
-1
Table 3.26.2 Overflow Definitions
Calculation Result
(MACOR register value)
MACOR > 2
64
−1
0 ≤ MACOR ≤ 2
−1
64
MACOR < 0
−1
MACOR > 2
63
−2
63
≤ MACOR ≤2
63
MACOR < −2
63
92CZ26A-631
MACOR Register
0 ∼ 2
64
−1
−2
63
∼ +2
63
−1
MACCR<MOVF>
1
0
1
1
−1
0
1
TMP92CZ26A

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900Tmp92cz26axbg

Table of Contents