Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function Controllers, Mul

Models: DVP-ES2/EX2/SS2/SA2/SX2/SE

1 702
Download 702 pages 56.54 Kb
Page 194
Image 194

DVP - ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

API

22

Mnemonic

Operands

Function

Controllers

D

MUL

P

Multiplication

ES2/EX2

SS2

SA2

SX2

SE

Type

 

Bit Devices

 

 

 

 

Word devices

 

 

 

 

 

 

Program Steps

 

OP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

Y

M

S

K

H

KnX

KnY

KnM

KnS

T

C

D

E

F

MUL, DMULP: 7 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1

 

 

 

 

 

 

 

*

*

*

 

*

*

*

*

*

*

 

*

 

DMUL, DMULP: 13 steps

S2

 

 

 

 

 

 

 

*

*

*

 

*

*

*

*

*

 

*

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

 

 

*

*

*

*

*

*

 

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

16-bit

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

 

 

 

 

 

 

 

SE

 

SE

 

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1: Multiplicand

S2: Multiplicator

 

D: Product

 

 

 

 

 

 

 

 

 

 

 

 

 

Explanations:

1.This instruction multiplies S1 by S2 in BIN format and stores the result in D. Care should be taken on positive/negative signs of S1, S2 and D when doing 16-bit and 32-bit operations.

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

3.If operands S1, S2 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

 

 

 

 

 

+1

 

 

b15

b00

b15

b00

b31

............ b16

b15

b00

 

X

 

=

 

 

 

 

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=0,S2 is a positive value

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

B15=1,S1 is a negative value

b15=1,S2 is a negative value

b31=1,D(D+1) is a negative value

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

+1

+1

+3

+2

+1

 

b31.. b16 b15.. b00

b31.. b16 b15.. b00

b63. b48 b47. b32 b31. b16

b15. b00

X

 

=

 

 

 

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=0,S2(S2+1) is a positive value

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

b31=1,S1(S1+1) is a negative value b31=1,S2(S2+1) is a negative value b63=1, D~(D+3) is a negative value

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.

3 - 78

Page 194
Image 194
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function Controllers, Mul