
25 Multiplier/Divider
S1C17003 TECHNICAL MANUAL
EPSON
25-5
M/D
25.5 Product-sum Operation
The Product-sum operation function executes “A (32 bits) = B (16 bits) x C (16 bits) + A (32 bits).”
The initial value (A) must be set to the arithmetic result register before performing Product-sum operations.
To clear the arithmetic result register (A = 0), set the operating mode to 0x0. There is no need to send 0x0 to the
multiplier/divider using separate instructions.
To load 16-bit or 32-bit values to the arithmetic result register, set the operating mode to 0x1 (16 bits) or 0x2 (32
bits). Next, transfer the initial value to the multiplier/divider using the “l(fā)d.cf” instruction.
S1C17 core
Arithmetic result
register
Selector
16 bits
32 bits
Coprocessor
output (16 bits)
Flag output
Argument 2
Argument 1
Figure 25.5.1: Initialization mode data paths
Table 25.5.1: Arithmetic result register initialization
Mode
setting
Instruction
Operation
Remarks
0x0
–
res[31:0]
← 0x0
Initializes using operating mode settings only (no data
transfer).
0x1
ld.cf %rd,%rs
res[31:16]
← 0x0
res[15:0]
← %rs
(ext
imm9)
ld.cf %rd,imm7
res[31:16]
← 0x0
res[15:0]
← imm7/16
0x2
ld.cf %rd,%rs
res[31:16]
← %rd
res[15:0]
← %rs
(ext
imm9)
ld.cf %rd,imm7
res[31:16]
← %rd
res[15:0]
← imm7/16
res: Arithmetic result register
To perform MAC operations, set the operating mode to 0x7 (signed MAC). Next, transfer the 16-bit multiplicand (B)
and 16-bit multiplier (C) to the multiplier/divider using the “l(fā)d.ca” instruction. Half of the arithmetic result (16
bits, A [15:0] or A[31:16], depending on output mode) is returned to the CPU register together with the flag status.
The remaining half of the arithmetic result is read out by setting the multiplier/divider to arithmetic result reading
mode.
The PSR overflow flag (V) is set to 1 by the arithmetic results. Other flags are cleared to 0.
Transfer the required number of multiplicands and multipliers to continue MAC operations without switching to
arithmetic result reading mode. In this case, there is no need to set to MAC mode each time data is sent.