21 Multiplier/Divider (COPRO)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
21-1
(Rev. 1.0)
Multiplier/Divider (COPRO)
21
Overview
21.1
COPRO is the coprocessor that provides multiplier/divider functions. The features of COPRO 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 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.
(16 bits
÷
16 bits = 16 bits with 16-bit residue)
Can be executed in 17 to 20 cycles.
Figure 21.1.1 shows the COPRO configuration.
S1C17 Core
Arithmetic unit
Operation result
register
Mode setting
Selector
Argument 2
Argument 1
Coprocessor
output
Flag output
Operation
result
COPRO
1.1 COPRO Configuration
Figure 21.
Operation Mode and Output Mode
21.2
COPRO operates according to the operation mode specified by the application program. As listed in Table 21.2.1,
COPRO supports nine 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
results to be read from COPRO.
The operation and output modes can be specified with a 7-bit data by writing it to the mode setting register in CO-
PRO. 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
2.1 Mode Setting Register
Figure 21.