18 Multiplier/Divider (COPRO2)
18-6
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
Table 18.5.1 Initializing the Operation Result Register 0
Mode set-
ting value
Instruction
Operations
Remarks
0x00
–
res0[31:0]
←
0x0
res1[31:0]
←
0x0
Setting the operating mode executes the initialization
without sending data.
0x01
ld.cf %rd,%rs
res0[31:16]
←
0x0
res0[15:0]
←
%rs
(
ext imm9
)
ld.cf %rd,imm7
res0[31:16]
←
0x0
res0[15:0]
←
imm7/16
0x02
ld.cf %rd,%rs
res0[31:16]
←
%rd
res0[15:0]
←
%rs
(
ext imm9
)
ld.cf %rd,imm7
res0[31:16]
←
%rd
res0[15:0]
←
imm7/16
res0: operation result register 0, res1: operation result register 1
32 bits
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.5.2 Data Path in MAC Mode
Table 18.5.2 Operation in MAC Mode
Mode set-
ting value
Instruction
Operations
Flags
Remarks
0x06
or 0x07
ld.ca %rd,%rs
res0[31:0]
←
%rd
×
%rs + res0[31:0]
%rd
←
res0[15:0]
psr (CVZN)
←
0b0100
if an overflow has oc-
curred
Otherwise
psr (CVZN)
←
0b0000
The operation result
register 0 keeps the
operation result until
it is rewritten by other
operation.
Overflow can be de-
tected only in signed
MAC mode (it does
not occur in unsigned
MAC mode).
(
ext imm9
)
ld.ca %rd,imm7
res0[31:0]
←
%rd
×
imm7/16 + res0[31:0]
%rd
←
res0[15:0]
0x16
or 0x17
ld.ca %rd,%rs
res0[31:0]
←
%rd
×
%rs + res0[31:0]
%rd
←
res0[31:16]
(
ext imm9
)
ld.ca %rd,imm7
res0[31:0]
←
%rd
×
imm7/16 + res0[31:0]
%rd
←
res0[31:16]
res0: operation result register 0
Example:
ld.cw %r0,0x00 ;
Sets the mode (initialize mode 0) to clear the operation result register 0 to 0x0000.
ld.cw %r0,0x07 ;
Sets the mode (signed MAC mode and 16 low-order bits output mode 0).
ld.ca %r0,%r1 ;
Performs “res0[31:0] = %r0[15:0]
×
%r1[15:0] + res0[31:0]” and loads the 16 low-
order bits of the result to %r0.
ld.cw %r0,0x13 ;
Sets the mode (operation result read mode and 16 high-order bits output mode 0).
ld.ca %r1,%r0 ;
Loads the 16 high-order bits of the result to %r1.