18 Multiplier/Divider (COPRO2)
18-2
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
Table 18.2.1 Mode Settings
Setting
value
(D[6:4])
Output mode
Setting
value
(D[3:0])
Operation mode
0x0
16 low-order bits output mode 0
The low-order 16 bits of the operation result reg-
ister 0 can be read as the coprocessor output.
0x0
Initialize mode 0
Clears the operation result registers 0 and 1
to 0x0.
0x1
16 high-order bits output mode 0
The high-order 16 bits of the operation result reg-
ister 0 can be read as the coprocessor output.
0x1
Initialize mode 1
Loads the 16-bit augend into the low-order
16 bits of the operation result register 0.
0x2
16 low-order bits output mode 1
The low-order 16 bits of the operation result reg-
ister 1 can be read as the coprocessor output.
0x2
Initialize mode 2
Loads the 32-bit data into the operation re-
sult register 0.
0x3
16 high-order bits output mode 1
The high-order 16 bits of the operation result reg-
ister 1 can be read as the coprocessor output.
0x3
Operation result read mode
Outputs the data in the operation result reg-
isters 0 and 1 without computation.
0x4–0x7 Reserved
0x4
Unsigned multiplication mode
Performs unsigned multiplication.
0x5
Signed multiplication mode
Performs signed multiplication.
0x6
Unsigned MAC mode
Performs unsigned MAC operation.
0x7
Signed MAC mode
Performs signed MAC operation.
0x8
Unsigned division mode
Performs unsigned division.
0x9
Signed division mode
Performs signed division.
0xa
Initialize mode 3
Loads the 32-bit data into the operation re-
sult register 1.
0xb–0xf Reserved
18.3 Multiplication
The multiplication function performs “A (32 bits) = B (16 bits)
×
C (16 bits).”
The following shows a procedure to perform a multiplication:
1. Set the mode to 0x04 (unsigned multiplication, 16 low-order bits output mode 0) or 0x05 (signed multiplica-
tion, 16 low-order bits output mode 0).
2. Send the 16-bit multiplicand (B) and 16-bit multiplier (C) to COPRO2 using a “
ld.ca
” instruction.
3. Read the one-half result (16 low-order bits = A[15:0]) and the flag status.
4. Set the mode to 0x13 (operation result read, 16 high-order bits output mode 0).
5. Read another one-half result (16 high-order bits = A[31:16]).
16 bits
32 bits
S1C17 Core
Operation result
register 0
Operation result
register 1
Selector
Argument 2
Argument 1
Coprocessor
output (16 bits)
Flag output
Operation result
COPRO2
Figure 18.3.1 Data Path in Multiplication Mode