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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

188 MBS P Matrix bit shift<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 />

MBS, MBSP: 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. MBS instruction shifts the bits in the matrix to the left or the right. M1097 = OFF, bits shift to<br />

the left, M1097 = ON, bits shift to the right. The empty bit (left shift: b0; right shift: b16n-1)<br />

after every bit is shifted once will be filled with the value of M1096 (Borrow flag for matrix<br />

operation). The bit which is shifted out of the matrix (left shift: b16n-1; right shift: b0) will be<br />

sent to M1095 (Carry flag for matrix operation) and operation result is stored in D.<br />

2. The pulse execution instruction (MBSP) 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 />

M1096: Borrow flag for matrix rotation/shift/input<br />

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

Program Example 1:<br />

When X0 = ON, M1097 = OFF, indicating a left matrix shift is performed. Assume matrix borrow<br />

flag M1096 = OFF (0) and the 16-bit registers D0 ~ D2 will perform a left matrix shift and the result<br />

will be stored in the matrix of the 16-bit registers D20 ~ D22, meanwhile the matrix carry flag<br />

M1095 will be ON (1). .<br />

X0<br />

RST<br />

M1097<br />

MBSP D0 D20 K3<br />

3-419

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

Saved successfully!

Ooh no, something went wrong!