beautypg.com

Delta DVP-ES2 User Manual

Page 194

background image

D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g

3 - 7 8

API Mnemonic

Operands

Function

22

D MUL P

Multiplication

Controllers

ES2/EX2 SS2

SA2

SE

SX2

Bit Devices

Word devices

Program Steps

Type

OP

X Y M S K H

KnX

KnY KnM KnS T C D E F

S

1

*

* *

*

*

*

*

*

*

*

S

2

*

* *

*

*

*

*

*

*

*

D

*

*

*

*

*

*

*

MUL, DMULP: 7 steps

DMUL, DMULP: 13 steps

PULSE 16-bit 32-bit

ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2

Operands:

S

1

: Multiplicand S

2

: Multiplicator D: Product

Explanations:

1. This

instruction multiplies S

1

by S

2

in BIN format and stores the result in D. Care should be

taken on positive/negative signs of S

1

, S

2

and D when doing 16-bit and 32-bit operations.

2.

MSB = 0, positive; MSB = 1, negative.

3. If

operands

S

1

, S

2

use index F, then only 16-bit instruction is available.

4. If

operand

D use index E, then only 16-bit instruction is available.

5.

16-bit BIN multiplication

b15................ b00

X

=

b15................ b00

b31............ b16 b15............. b00

+1

b15 is the sign bit

b15 is the sign bit

b31 is hte sign bit(b15 of D+1)

b15=0,S1 is a positive value
B15=1,S1 is a negative value

b15=0,S2 is a positive value
b15=1,S2 is a negative value

b31=0,D(D+1) is a positive value
b31=1,

is a negative value

D(D+1)

If D is specified with a bit device, it can designate K1 ~ K4 to store a 16-bit result. Users can

use consecutive 2 16-bit registers to store 32-bit data.

6.

32-bit BIN multiplication

b31.. b16

X

=

+1

b31 is the sign bit

b31 is the sign bit

b63 is the sign bit(b15 of D+3)

B31=0,S1(S1+1) is a positive value
b31=1,S1(S1+1) is a negative value

b31=0,S2(S2+1) is a positive value
b31=1,S2(S2+1) is a negative value

b63=0, D~(D+3) is a positive value
b63=1, D~(D+3) is a negative value

b15.. b00

b31.. b16 b15.. b00

+1

b63. b48 b47. b32 b31. b16 b15. b00

+3

+2

+1

If D is specified with a word device, it can specify K1~K8 to store a 32-bit result. Users can

use 2 consecutive 32-bit registers to store 64-bit data.

This manual is related to the following products: