模式匹配

所有位串均具有模式匹配功能。

该功能可用于检测启动代码等。要使用该功能,则必须用需匹配的模式来对REG_SS 编程

(请注意, POS 达到零时 REG_SS 不会与 REG  交换!)

MATCH_MODE 位必须设为1。

输入数据 REG 现在与已编程的模式 REG_SS 相比较。发现匹配时会提出模式匹配中断。

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 is not masked.

匹配掩码

四个位串(A、H、I 和P)同样支持对模式的掩码;必须设置MASK_x 以便对模式位进行比较(‘1’表示比较)。

例如,寻找模式0x1234.xxxx.5678.9ABC 时,

REG 应设置为0x1234.xxxx.5678.9ABC,

MASK 设置为0xFFFF.0000.FFFF.FFFF。

When using the data match interrupt bit 0 has to be high.

When using data match mode, the slice’s shadow register [ REG_SS ] should hold the pattern to be matched.

In addition, when data match is enabled the main register [ REG ] and the shadow register [ REG_SS ] will not exchange when FIFO is done with input or output data.

Pattern match

All slices feature pattern match functionality.

This can be used for example to detect a start code.

To use this functionality, REG_SS must be programmed with the pattern to be matched
(Note that REG_SS will not be swapped with REG when POS reaches zero!).

The MATCH_MODE bit must be set to 1.

The input data is now compared to the programmed pattern.

When a match is 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 be compared (1 is compare).

E.g. when looking for pattern 0x1234 XXXX, then REG_SS should be set to 0x1234 XXXX and MASK to 0xFFFF 0000.

0x1234 xxxx -- REG
0x1234 -- REG_SS
0xFFFF -- MASK

MASK_A, MASK_H, MASK_I, MASK_P

The mask registers are used for the “on pattern match” interrupts.

With some slices it is possible to mask the data for the pattern match interrupts. Slices A, H, I and P support this function.

Every bit that is 1 in this register will be masked.

If this register contains the value 0b00001111 the first 4 bits will be masked for the pattern interrupt.

LPC43xx SGPIO Pattern Match Mode的更多相关文章

  1. LPC43xx SGPIO Experimentation

    LPC4350 SGPIO Experimentation The NXP LPC43xx microcontrollers have an interesting, programmable ser ...

  2. LPC43xx SGPIO DMA and Interrupts

    The SGPIO output pins SGPIO14 and SGPIO15 can trigger a GPDMA request SGPIO pins SGPIO14 and SGPIO15 ...

  3. LPC43xx SGPIO Configuration -- Why not use GPDMA ?

    LPC43xx SGPIO Configuration The LPC43xx SGPIO peripheral is used to move samples between USB and the ...

  4. python正则表达式基础,以及pattern.match(),re.match(),pattern.search(),re.search()方法的使用和区别

    正则表达式(regular expression)是一个特殊的字符序列,描述了一种字符串匹配的模式,可以用来检查一个字符串是否含有某种子字符串. 将匹配的子字符串替换或者从某个字符串中取出符合某个条件 ...

  5. G面经prepare: Pattern Match

    设定一个pattern 把 'internationalization' 变成 'i18n', 比如word是house,pattern可以是h3e, 3se, 5, 1o1s1等, 给pattern ...

  6. LPC43xx SGPIO I2C Implementation

    I²C SGPIO Configuration SGPIO is a hardware feature of LPC4300 series. There are 16 SGPIO pins calle ...

  7. LPC43xx SGPIO Slice 示意图

    SGPIO inverted clock qualifier Hi, With bits 6:5 of SGPIO_MUX_CFG the QUALIFIER_MODE is selected (0x ...

  8. LPC43xx SGPIO Camera interface design

    AN11196: Camera interface design using SGPIO

  9. LPC43xx SGPIO Slice 输入输出连接表

随机推荐

  1. LeetCode(一)

    数据流的中位数 class MedianFinder { private Queue<Integer> maxHeap = new PriorityQueue(new Comparator ...

  2. try-catch-finally的含有return使用揭秘

    很多人都会纠结这么一个问题try-catch-finally中有return的情况,我自己总结如下: 如果是值类型的话 请看代码 using System; using System.Collecti ...

  3. Browser设置UA值

    SWE Browser中的OptionMenu是Controller通过onKeyDown监听KEYCODE_MENU来显示的 public boolean onKeyDown(int keyCode ...

  4. NET Framework 4.0的安装失败处理

    如果是XP系统,这么做:1.开始——运行——输入cmd——回车——在打开的窗口中输入net stop WuAuServ2.开始——运行——输入%windir%3.在打开的窗口中有个文件夹叫Softwa ...

  5. STL学习之路

    本文面向的读者:学习过C++程序设计语言(也就是说学习过Template),但是还没有接触过STL的STL的初学者.这实际上是我学习STL的一篇笔记,老鸟就不用看了. 什么是泛型程序设计 我们可以简单 ...

  6. spring:bean的定义

    一个完整的Bean的配置文件: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE beans ...

  7. ThinkPHP 模板判断输出--Switch 标签

    ThinkPHP 模板引擎支持 switch 判断,根据不同情况输出不同的值,格式如下:<switch name="变量名" >    <case value=& ...

  8. [UE4]武器碰撞

    实现武器战斗伤害系统,击中时如何发出碰撞事件产生伤害,目前探索的有通过物理碰撞和LineTrace两种方法. 物理碰撞通过Overlap事件的方法,优点是易于实现,缺点是无法具体到碰撞骨骼位置,低帧数 ...

  9. APUE1

    [APUE]进程控制(上)   一.进程标识 进程ID 0是调度进程,常常被称为交换进程(swapper).该进程并不执行任何磁盘上的程序--它是内核的一部分,因此也被称为系统进程.进程ID 1是in ...

  10. elixir 入门笔记

    安装 MAC 平台用 brew 安装 brew update brew install elixir 如果没有 erlang 环境,上面的命令会自定安装 erlang 的环境. 基本数据类型 iex& ...