
Chapter 5. Application instructions
5-41
2) Program example
-
Shifts the block from P0013 ~ P001B (9 bits) with the configuration as following :
-
Input data bit : M000A
-
Shift direction but : M000B
-
Clock : P0000
-
Reset signal : P0001
M000A
SR
D P0014
N 7
M000B
P0000
P0001
P001
The block to be shifted
F
E
D
C
B
A 9
8
7
6
5
4
3
2
1
0
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
0
a) After 1 clocks when M000A=0 and M000B=0
P001
Fill with 0
Left direction shift
F
E
D
C
B
A 9
8
7
6
5
4
3
2
1
0
1
0
1
1
1
0
1
1
1
0
1
1
0
0
1
0
b) After 2 clocks when M000A=1 and M000B=0
P001
F
E
D
C
B
A 9
8
7
6
5
4
3
2
1
0
1
0
1
1
0
1
1
1
0
1
1
0
1
0
1
0
Fill with 1
Left direction shift
c) After 3 clocks when M000A=0 and M000B=1
P001
F
E
D
C
B
A 9
8
7
6
5
4
3
2
1
0
1
0
1
1
0
0
1
1
1
0
1
1
0
0
1
0
Fill with 0
Right direction shift
d) After 4 clocks when M000A=1 and M000B=1
P001
F
E
D
C
B
A 9
8
7
6
5
4
3
2
1
0
1
0
1
1
1
0
0
1
1
1
0
1
1
0
1
0
Fill with 1
Right direction shift