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-detectio n 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 re sult register.
The relationship between the detected positions and the values to be returned are summari zed in
Table 13.3-1.
If no "0" is found (if the value is FFFFFFFFH), 32 is returned as the search result.
[Execution example]
Write data Re ad value (decimal)
11111111 11111111 11110000 00000000B (FFFFF000H) ==> 20
11111000 01001001 11100000 10101010B (F849E0AAH) == > 5
10000000 00000010 10101010 10101010B (8002AAAAH) ==> 1
11111111 11111111 11111111 11111111B (FFFFFFFFH) ==> 32
1-Detection
The module scans the data written to the 1-detectio n 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 re sult register.
The relationship between the detected positions and the values to be returned are summari zed in
Table 13.3-1.
If no "1" is found (if the value is 00000000H), 32 is retur ned as the search result.
[Execution example]
Write data Re ad value (decimal)
00100000 00000000 00000000 00000000B (20000000H) = => 2
00000001 00100011 01000101 01100111B (01234567H) = => 7
00000000 00000011 11111111 11111111B (0003FFFFH) ==> 14
00000000 00000000 00000000 00000001B (00000001H) = => 31
00000000 00000000 00000000 00000000B (00000000H) = => 32