3. Instruction Set

API

180

Mnemonic

 

Operands

Function

 

 

 

 

 

 

 

MAND

 

P

 

Matrix AND

 

 

 

 

 

 

Controllers

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

MAND, MANDP: 9 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1

 

 

 

 

 

 

*

*

 

*

 

*

 

*

*

*

 

 

 

 

 

 

 

 

 

S2

 

 

 

 

 

 

*

*

 

*

 

*

 

*

*

*

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

*

 

*

 

*

 

*

*

*

 

 

 

 

 

 

 

 

 

n

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16-bit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

 

 

 

 

 

 

 

 

SE

SE

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1: Matrix source device 1

S2: Matrix source device 2

D: Operation result

 

 

n: Matrix length (n = K1~K256)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Explanations:

1.MAND instruction performs matrix AND operation between matrix source device 1 and 2 with matrix length n and stores the operation result in D.

2.Rule of AND operation: the result is 1 only when both two bits are 1; otherwise the result is 0.

3.If operands S1, S2, D use KnX, KnY, KnM, KnS format, only n = 4 is applicable.

Program Example:

When X0 = ON, MAND performs matrix AND operation between 16-bit registers D0~D2 and 16-bit registers D10~D12. The operation result is then stored in 16-bit registers D20~D22.

X0

 

 

 

 

MAND

D0

D10

D20

K3

D0

b15

b0

1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1

D1

1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1

D2

1 1 1 1 1 1 1 1 1 1

0 0 0 0 1 1

Before

 

 

 

 

 

MAND

 

 

 

 

 

 

Execution

D10

0 0

0

1

0 0 1

0 0

0

1

1

0

1

0

0

 

D11 0 0

0

1

0 0

1

0 0

0

1

1

0

1

0

0

 

D12 0 0

0

1

0 0

1

0 0

0

1

1

0

1

0

0

After

D20

0 0

0

1

0 0

1

0

0

0

0

0 0

0 0

0

Execution

D21

0 0

0

1

0 0

1

0

0

0 0

0 0

0

0

0

 

D22

0 0

0

1

0 0

1

0

0

0 0

0 0

0

0

0

3 - 4 0 7

Page 523
Image 523
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mand, Matrix