18 Multiplier/Divider (COPRO2)
S1C17M12/M13 TECHNICAL MANUAL
Seiko Epson Corporation
18-1
(Rev. 1.2)
18 Multiplier/Divider (COPRO2)
18.1 Overview
COPRO2 is the coprocessor that provides multiplier/divider functions. The features of COPRO2 are listed below.
• Multiplication:
Supports signed/unsigned multiplications.
(16 bits
×
16 bits = 32 bits)
Can be executed in 1 cycle.
• Multiplication and accumulation (MAC): Supports signed/unsigned MAC operations with overflow detection
function. (16 bits
×
16 bits + 32 bits = 32 bits)
Can be executed in 1 cycle.
• Division:
Supports signed/unsigned divisions.
(32 bits
÷
32 bits = 32 bits with 32-bit reminder)
Can be executed in 17 to 20 cycles.
Overflow detection and division by zero processing are not supported.
Figure 18.1.1 shows the COPRO2 configuration.
S1C17 Core
Arithmetic unit
Operation result
register 0
Operation result
register 1
Mode setting
Selector
Argument 2
Argument 1
Coprocessor
output
Flag output
Operation result
COPRO2
Figure 18.1.1 COPRO2 Configuration
18.2 Operation Mode and Output Mode
COPRO2 operates according to the operation mode specified by the application program. As listed in Table 18.2.1,
COPRO2 supports 11 operations.
The multiplication, division and MAC results are 32-bit data, therefore, the S1C17 Core cannot read them in one
access cycle. The output mode is provided to specify the high-order 16 bits or low-order 16 bits of the operation
result register 0 or 1 to be read from COPRO2.
The operation and output modes can be specified with a 7-bit data by writing it to the mode setting register in
COPRO2. Use a “
ld.cw
” instruction for this writing.
ld.cw %rd,%rs
%rs[6:0] is written to the mode setting register. (%rd: not used)
ld.cw %rd,imm7
imm7
[6:0] is written to the mode setting register. (%rd: not used)
6
4 3
0
Output mode setting value
Operation mode setting value
Figure 18.2.1 Mode Setting Register