295
13.3 Bit Search Module Operation and Save/Restore Processing
13.3 Bit Search Module Operation and Save/Restore Processing
This section explains the operations of the bit search module for 0-detection, 1-detection,
and change-point detection and also explains save and restore processing.
■
0-Detection
The module scans the data written to the 0-detection data register from MSB to LSB and returns
the position where the first "0" is detected.
The detection result can be obtained by reading the detection result register.
The relationship between the detected positions and the values to be returned are summarized in
Table 13.3-1.
If no "0" is found (if the value is FFFFFFFF
H
), 32 is returned as the search result.
[Execution example]
Write data Read value (decimal)
11111111 11111111 11110000 00000000
B
(FFFFF000
H
) ==> 20
11111000 01001001 11100000 10101010
B
(F849E0AA
H
) ==> 5
10000000 00000010 10101010 10101010
B
(8002AAAA
H
) ==> 1
11111111 11111111 11111111 11111111
B
(FFFFFFFF
H
) ==> 32
■
1-Detection
The module scans the data written to the 1-detection data register from MSB to LSB and returns
the position where the first "1" is detected.
The detection result can be obtained by reading the detection result register.
The relationship between the detected positions and the values to be returned are summarized in
Table 13.3-1.
If no "1" is found (if the value is 00000000
H
), 32 is returned as the search result.
[Execution example]
Write data Read value (decimal)
00100000 00000000 00000000 00000000
B
(20000000
H
) ==> 2
00000001 00100011 01000101 01100111
B
(01234567
H
) ==> 7
00000000 00000011 11111111 11111111
B
(0003FFFF
H
) ==> 14
00000000 00000000 00000000 00000001
B
(00000001
H
) ==> 31
00000000 00000000 00000000 00000000
B
(00000000
H
) ==> 32
Содержание MB91F109
Страница 2: ......
Страница 3: ...FUJITSU LIMITED FR30 32 Bit Microcontroller MB91F109 Hardware Manual ...
Страница 4: ......
Страница 10: ...vi ...
Страница 24: ...xx ...
Страница 95: ...71 2 10 Operation Mode MODR writing RSTX reset MD2 1 0 BW1 and BW0 of AMD0 to AMD5 Bus width specification ...
Страница 96: ...72 CHAPTER 2 CPU ...
Страница 224: ...200 CHAPTER 4 BUS INTERFACE ...
Страница 234: ...210 CHAPTER 5 I O PORTS ...
Страница 268: ...244 CHAPTER 9 U TIMER ...
Страница 290: ...266 CHAPTER 10 UART ...
Страница 314: ...290 CHAPTER 12 16 BIT RELOAD TIMER ...
Страница 322: ...298 CHAPTER 13 BIT SEARCH MODULE ...
Страница 392: ...368 CHAPTER 16 FLASH MEMORY ...
Страница 432: ...408 APPENDIX E Instructions F Table E 2 Instruction Formats OP rel11 5 11 ...
Страница 448: ...424 APPENDIX E Instructions ...
Страница 449: ...425 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 458: ...434 INDEX ...
Страница 460: ......
Страница 461: ...FUJITSU SEMICONDUCTOR FR30 32 Bit Microcontroller MB91F109 Hardware Manual ...