![Infineon Technologies TC1784 User Manual Download Page 816](http://html.mh-extra.com/html/infineon-technologies/tc1784/tc1784_user-manual_2055446816.webp)
TC1784
Peripheral Control Processor (PCP)
User´s Manual
10-151
V1.1, 2011-05
PCP, V2.09
RR
R1, 8
;Rotate least significant byte of R1
;to most significant byte
MINIT
R1, R4
;Initialize ready for multiply
MSTEP32
R1, R4
;Perform one MSTEP32 instruction
;(8 bit multiply)
After this sequence, R0 holds the result, R1 is left unchanged (right rotated by RR
instruction then left rotated by MSTEP32 instruction), and R4 is unchanged. The result
is only valid if there is no overflow (i.e. the product of the 8-bit number in R1 multiplied
by the 32-bit number in R4 can be contained within 32 bits). It is the user’s responsibility
to ensure that this is the case. The overflow condition cannot be detected after execution
of the multiply sequence.
Example of a 32
×
16 bit multiply (R3
×
R2) yielding a 32 bit result
(R3 = 32 bit, R2 = 16 bit):
RR
R2, 8
;Perform two 8 bit rotations
;(RR instructions) to get original
;least significant 16 bits into
;most significant 16 bits
RR
R2, 8
MINIT
R2, R3
;Initialize ready for multiply
MSTEP32
R2, R3
;Perform two MSTEP32 instructions
;(16 bit multiply)
MSTEP32
R2, R3
After this sequence, R0 holds the result, R2 is left unchanged (right rotated by two RR
instructions, then left rotated by two MSTEP32 instructions), R3 is unchanged. The
comment above regarding overflow also applies to this sequence.
Example of a 32
×
32 bit multiply (R5
×
R2) yielding a 64 bit result
(R5 = 32 bit, R2 = 32 bit):
MINIT
R2, R5
;Initialize ready for multiply
MSTEP64
R2, R5
;Perform 4 MSTEP64 instructions
;(64-bit multiply)
MSTEP64
R2, R5
MSTEP64
R2, R5
MSTEP64
R2, R5
After this sequence R0 and R2 hold the result (most significant word in R0, least
significant word in R2), R5 is unchanged. There is no possibility of overflow as the result
of 32
×
32 bits can always be contained in 64 bits.
Summary of Contents for TC1784
Page 1: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Page 3: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Page 950: ...TC1784 Direct Memory Access Controller DMA User s Manual 11 132 V1 1 2011 05 DMA V3 03 ...
Page 1949: ...TC1784 General Purpose Timer Array GPTA v5 User s Manual 21 297 V1 1 2011 05 GPTA v5 V1 14 ...
Page 2350: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG Doc_Number ...