![](http://datasheet.mmic.net.cn/Microchip-Technology/PIC17C44-33-L_datasheet_99509/PIC17C44-33-L_49.png)
1996 Microchip Technology Inc.
DS30412C-page 49
PIC17C4X
8.0
HARDWARE MULTIPLIER
All PIC17C4X devices except the PIC17C42, have an
8 x 8 hardware multiplier included in the ALU of the
device. By making the multiply a hardware operation, it
completes in a single instruction cycle. This is an
unsigned multiply that gives a 16-bit result. The result
is
stored
into
the
16-bit
PRODuct
register
(PRODH:PRODL). The multiplier does not affect any
ags in the ALUSTA register.
Making the 8 x 8 multiplier execute in a single cycle
gives the following advantages:
Higher computational throughput
Reduces code size requirements for multiply
algorithms
The performance increase allows the device to be used
in applications previously reserved for Digital Signal
Processors.
Table 8-1 shows a performance comparison between
the PIC17C42 and all other PIC17CXX devices, which
have the single cycle hardware multiply.
unsigned multiply. Only one instruction is required
when one argument of the multiply is already loaded in
the WREG register.
multiply. To account for the sign bits of the arguments,
each argument’s most signicant bit (MSb) is tested
and the appropriate subtractions are done.
EXAMPLE 8-1:
8 x 8 MULTIPLY ROUTINE
MOVFP
ARG1, WREG
MULWF
ARG2
; ARG1 * ARG2 ->
;
PRODH:PRODL
EXAMPLE 8-2:
8 x 8 SIGNED MULTIPLY
ROUTINE
MOVFP
ARG1, WREG
MULWF
ARG2
; ARG1 * ARG2 ->
;
PRODH:PRODL
BTFSC
ARG2, SB
; Test Sign Bit
SUBWF
PRODH, F
; PRODH = PRODH
;
- ARG1
MOVFP
ARG2, WREG
BTFSC
ARG1, SB
; Test Sign Bit
SUBWF
PRODH, F
; PRODH = PRODH
;
- ARG2
TABLE 8-1:
PERFORMANCE COMPARISON
Routine
Device
Program Memory
(Words)
Cycles (Max)
Time
@ 25 MHz
@ 33 MHz
8 x 8 unsigned
PIC17C42
13
69
11.04
s
N/A
All other PIC17CXX devices
1
160 ns
121 ns
8 x 8 signed
PIC17C42
—
N/A
All other PIC17CXX devices
6
960 ns
727 ns
16 x 16 unsigned
PIC17C42
21
242
38.72
s
N/A
All other PIC17CXX devices
24
3.84
s
2.91
s
16 x 16 signed
PIC17C42
52
254
40.64
s
N/A
All other PIC17CXX devices
36
5.76
s
4.36
s
This document was created with FrameMaker404