17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

189 MBR P Matrix bit rotate<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong><br />

SE<br />

Type<br />

Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F<br />

S * * * * * * *<br />

D * * * * * *<br />

n * * *<br />

MBR, MBRP: 7 steps<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S: Matrix source device D: <strong>Operation</strong> result n: Matrix length (K1~K256)<br />

Explanations:<br />

1. MBR instruction rotates the bits in the matrix to the left or the right. M1097 = OFF, bits rotate<br />

to the left, M1097 = ON, bits rotate to the right. The empty bit (left rotate: b0; right rotate:<br />

b16n-1) after rotation performed once will be filled with the bit which is rotated out of the<br />

matrix (left rotate: b16n-1; right rotate: b0) and the operation result is stored in D. In addition,<br />

the bit which is rotated out of the matrix will also be moved to M1095 (Carry flag for matrix<br />

operation).<br />

2. The pulse execution instruction MBRP is generally adopted.<br />

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

4. Associated flags:<br />

M1095: Carry flag for matrix rotation/shift/output.<br />

M1097: Direction flag for matrix rotation/shift<br />

Program Example 1:<br />

When X0 = ON, M1097 = OFF, indicating a left matrix rotation is performed. The 16-bit registers<br />

D0 ~ D2 will perform a left matrix rotation and the result will be stored in the matrix of the 16-bit<br />

registers D20 ~ D22. The matrix carry flag M1095 will be ON (1)<br />

X0<br />

RST<br />

M1097<br />

MBRP D0 D20 K3<br />

3-421

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!