Pattern matching
All bit strings have a pattern matching function.
This feature can be used to detect startup code and so on. To use this feature, you must program the REG_SS with the pattern you want to match
(Note that the POS reaches 0 o'clock Reg_ss will not be swapped with REG!) )
The Match_mode bit must be set to 1.
The input data REG is now compared to the programmed mode REG_SS. A pattern-matching interrupt is raised when a match is found.
Bit Match_mode Selects whether the MATCH filter is active or whether data is captured.
Only Slice A, H, I, and P support matching with A mask (register mask_x).
For other slices The pattern was not masked.
Match Mask
The four-bit strings (A, H, I, and P) also support masks for the pattern; mask_x must be set to compare pattern bits (' 1 ' for comparison).
For example, when looking for pattern 0x1234.xxxx.5678.9abc,
REG should be set to 0X1234.XXXX.5678.9ABC,
MASK is set to 0XFFFF.0000.FFFF.FFFF.
When using the data match interrupt bit 0 have to is high.
When using data match mode, the Slice's shadow register [REG_SS] should hold the pattern to be matched .
In addition if data match is enabled the main register [REG] and the shadow register [ REG_SS] would not exchange if FIFO is do with input or output data.
Pattern match
All slices feature pattern match functionality.
This can is used for example to detect a start code.
To use this functionality, REG_SS must is programmed with the pattern to be matched
(Note that REG_SS won't is swapped with REG when POS reaches zero!).
The Match_mode bit must is set to 1.
The input data is now compared to the programmed pattern.
When a match was found the pattern match interrupt is raised.
Four slices (A, H, I and P) also support masking the pattern; Mask_x must be set for the pattern bits to being compared (1 is compare).
e.g. when looking for pattern 0x1234 xxxx, then REG_SS should is set to 0x1234 XXXX and MASK to 0xFFFF 0 000.
0x1234 xxxx-- REG0x12340000 -- reg_ss0xFFFF0000 -- MASK
Mask_a, Mask_h, Mask_i, mask_p
The mask registers is used for the ' on Pattern match ' interrupts.
With some slices it's possible to mask the data for the pattern match interrupts. Slices A, H, I and P support the This function.
Every bit, that is, 1 in this register would be masked.
If This register contains the value 0b00001111 the first 4 bits is masked for the pattern interrupt.
lpc43xx Sgpio Pattern Match Mode