18 inTeGeR MulTiPlieR
S1C63003/004/008/016 TeChniCal Manual
Seiko epson Corporation
18-1
(Rev. 1.1)
Integer Multiplier
18
[S1C63008/016]
Note: The S1C63003/004 has no integer multiplier included.
Configuration of integer Multiplier
18.1
The S1C63008/016 has a built-in unsigned-integer multiplier. This multiplier performs 8 bits
×
8 bits of multiplica-
tion or 16 bits
÷
8 bits of division and returns the results and three flag states.
Figure 18.1.1 shows the configuration of the integer multiplier.
Clock
manager
System clock
Flag
(NF/VF/ZF)
Destination register
High-order byte (DRH)
Low-order byte (DRL)
Data bus
Operation
control
(CALMD)
Source register
(SR)
Temporary
register B
Temporary
register A
Adder
1.1 Configuration of the integer multiplier
Figure 18.
Controlling Clock Manager
18.2
The integer multiplier operates with the clock supplied by the clock manager (CPU operating clock selected by OSCC
and CLKCHG). Before the integer multiplier can be run, write "1" to the MDCKE register to supply the operating
clock to the integer multiplier.
2.1 Controlling integer multiplier clock
Table 18.
MDCKE
Integer multiplier clock
1
When CLKCHG = "0":
f
OSC1
(32 kHz)
When OSCC = "1," CLKCHG = "1":
f
OSC3
0
Off
If it is not necessary to run the integer multiplier, stop the clock supply by setting MDCKE to "0" to reduce current
consumption.
Multiplication Mode
18.3
To perform a multiplication, set the multiplier to the source register (SR) and the multiplicand to the low-order 8 bits
(DRL) of the destination register, then write "0" to the calculation mode select register (CALMD). The multiplication
takes 10 CPU clock cycles from writing "0" to CALMD until the 16-bit product is loaded into the destination register
(DRH and DRL). At the same time the result is loaded, the operation flags (NF, VF and ZF) are updated. The follow-
ing shows the conditions that change the operation flag states and examples of multiplication.
N flag: Set when the MSB of DRH is "1" and reset when it is "0."
V flag: Always reset after a multiplication.
Z flag: Set when the 16-bit value in DRH/DRL is 0000H and reset when it is not 0000H.
<examples of multiplication>
DRL (multiplicand)
SR (multiplier)
DRH/DRL (product)
NF
VF
ZF
00H
64H
0000H
0
0
1
64H
58H
2260H
0
0
0
C8H
58H
44C0H
0
0
0
C8H
A5H
80E8H
1
0
0