3. Instruction Set

API

188

Mnemonic

 

Operands

Function

 

 

 

 

 

 

 

MBS

 

P

 

Matrix bit shift

 

 

 

 

 

 

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

MBS, MBSP: 7 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

 

*

*

 

*

 

*

 

*

*

*

 

 

 

 

 

 

 

 

 

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:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S: Matrix source device

D: Operation result n: Matrix length (K1~K256)

 

 

Explanations:

1.MBS instruction shifts the bits in the matrix to the left or the right. M1097 = OFF, bits shift to the left, M1097 = ON, bits shift to the right. The empty bit (left shift: b0; right shift: b16n-1) after every bit is shifted once will be filled with the value of M1096 (Borrow flag for matrix operation). The bit which is shifted out of the matrix (left shift: b16n-1; right shift: b0) will be sent to M1095 (Carry flag for matrix operation) and operation result is stored in D.

2.The pulse execution instruction (MBSP) is generally adopted.

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

4.Associated flags:

M1095: Carry flag for matrix rotation/shift/output

M1096: Borrow flag for matrix rotation/shift/input

M1097: Direction flag for matrix rotation/shift

Program Example 1:

When X0 = ON, M1097 = OFF, indicating a left matrix shift is performed. Assume matrix borrow flag M1096 = OFF (0) and the 16-bit registers D0 ~ D2 will perform a left matrix shift and the result will be stored in the matrix of the 16-bit registers D20 ~ D22, meanwhile the matrix carry flag M1095 will be ON (1). .

X0

RST M1097

MBSP D0 D20 K3

3 - 4 1 9

Page 535
Image 535
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mbs, Matrix bit shift