3. Instruction Set

API

189

Mnemonic

 

Operands

Function

 

 

 

 

 

 

 

MBR

 

P

 

Matrix bit rotate

 

 

 

 

 

 

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

MBR, MBRP: 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.MBR instruction rotates the bits in the matrix to the left or the right. M1097 = OFF, bits rotate to the left, M1097 = ON, bits rotate to the right. The empty bit (left rotate: b0; right rotate:

b16n-1) after rotation performed once will be filled with the bit which is rotated out of the matrix (left rotate: b16n-1; right rotate: b0) and the operation result is stored in D. In addition, the bit which is rotated out of the matrix will also be moved to M1095 (Carry flag for matrix operation).

2.The pulse execution instruction MBRP 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.

M1097: Direction flag for matrix rotation/shift

Program Example 1:

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

X0

RST M1097

MBRP D0 D20 K3

3 - 4 2 1

Page 537
Image 537
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mbr, Matrix bit rotate