Advanced Function Instruction
7 -11 2
FUN129
P
MBROT
MATRIX BIT ROTATE
FUN129
P
MBROT
Ms : Starting register of source matrix
Md : Starting register of destination matrix
L : Length of matrix (Ms and Md)
Ms, Md may combine with V, Z, P0~P9 to
serve indirect address application
WX
WY
WM
WS TMR CTR
HR
IR
OR
SR
ROR
DR
K
XR
Range
Ope-
rand
WX0
∣
WX240
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3840
∣
R3903
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
2
∣
256
V
、
Z
P0~P9
Ms
○
○
○
○
○
○
○
○
○
○
○
○
○
Md
○
○
○
○
○
○
○
○
*
○
*
○
○
L
○
*
○
○
L
Ms
Md
Rotate
left
1 bit
OTB
L/R=1
z
When rotate control "EN" = 1 or "EN
↑
" (
P
instruction)
has a transition from 0 to 1, matrix Ms will be
completely retrieved and rotated by one bit towards
the left (when L/R = 1) or to the right (when L/R = 0).
The space created by the rotation (with a left rotation it
will be M0, and with a right rotation it will be M
16L-1
) will
be replaced by the status of the rotated-out bit (with a
left rotation it will be M
16L-1
, and with a right rotation it
will be M0). The rotated-out bit will not only be used to
fill the above-mentioned space, it will also be
transferred to rotated-out bit "OTB".
L
Ms
Md
Shift
right
1 bit
OTB
L/R=0
X0
EN
L :
Md :
5
OTB
Ms : R 0
R 0
L/R
129P.MBROT
z
In the program at left, Ms and Md are the same matrix.
When X0 goes from 0
→
1, then the whole of Ms is
retrieved and rotated right (because L/R = 0) by 1 bit. It is
then stored back into Ms itself (because in this example
Ms and Md are the same matrix). The results are shown
at right in the diagram below.
Ms
15
↓
Ms
Ms
0
↓
Md
15
↓
Md
Md
0
↓
R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
R1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
R2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
R2 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0
R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
R4 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
↑
Ms
79
↑
Ms
64
X0=
Ö
↑
Md
79
↑
Md
64
Before execution
After execution
OTB
0
Содержание FBs-CBE
Страница 78: ...MEMO ...
Страница 111: ...4 6 X0 X1 Node A Y0 Y1 Node B differential down Incerse differential up t Scan time Inverse t t ...
Страница 141: ...Basic Function Instruction 6 16 FUN 2 SKP SKIP START FUN 2 SKP Y2 Y1 Y0 T201 10S X0 X1 X2 0 10 0 ...
Страница 305: ...MEMO ...
Страница 348: ...MEMO ...