
NXP Semiconductors
PNX15xx/952x Series
Volume 1 of 1
Chapter 23: LAN100 — Ethernet Media Access Controller
PNX15XX_PNX952X_SER_N_4
NXP B.V. 2007. All rights reserved.
Product data sheet
Rev. 4.0 — 03 December 2007
23-734
5.12.5
Pattern Match Filtering and Logic Functions
The LAN100 has four pattern-matching lters. Each lter is capable of covering
64-byte window in any location specied by PatternMatchSkip0/1/2/3[10:0] registers.
The pattern match lters analyze received packets for certain patterns. If the lter
nds a match, the lter asserts its match signal. Depending on the Join function and
the “AndOr” relation with other lters, the packet is then accepted or rejected.
The pattern-matching lters are imperfect lters. They calculate a 32-bit CRC on a
64-byte window. The window can have an offset as specied by the associated
PatternMatchSkip register. The Skip register is 11 bits wide, allowing up to 2047
bytes at the start of the packet to be skipped. The PatternMatchMask registers
specify a mask for the pattern matching windows so that some bytes can be masked
out in the CRC calculation. A byte is only input in the CRC calculation if the
corresponding byte enable bit in the PatternMatchMask register is set. A pattern
match lter produces a match if the calculated CRC matches the CRC in the
associated PatternMatchCRC register. Each of the four pattern match lters is
enabled by setting the corresponding PatternMatchEn[3:0] bit in the RxFilter register
to 1.
The same 32-bit CRC and polynomial are used as with the standard Ethernet CRC.
The PatternMatchMask register is 64 bits long, allowing up to 64 consecutive bytes of
the received packet to be included in the CRC calculation. When bit
b in the
PatternMatch register is 1 and the value of the Skip register is
s, then receive packet
byte number (
s+b) is included in the CRC calculation. Counting starts at the
destination address eld of the Ethernet MAC frame. The PatternMatchMask register
is split into low-order and high-order parts, and registers PatternMatchMaskL and
PatternMatchMaskH are each 32 bits wide.
There are four separate pattern-matching lters supported, and there are 4 sets of
related registers (PatternMatchMaskL0/1/2/3, PatternMatchMaskH0/1/2/3,
PatternMatchCRC0/1/2/3, PatternMatchSkip0/1/2/3), one set for each lter.
The PatternMatchJoin register bits allow several of the pattern matches to be
combined together to implement a more complex combined check. This can be used
to create a pattern match of more than 64 bits, and the multiple pattern matches do
not need to check adjacent portions of the receive packet.
For example, if the PatternMatchJoin register is set to 0xAFAFF0, then the results of
the pattern-match lter 0 and pattern-match lter 1 will be ANDed together, while the
results of lter 2 and 3 will be ignored. If the PatternMatchJoin register is set to
0x7A1BB1, then the join logic will perform the complex function:
(
a & !b) | c | !d
where
a, b, c, d are the results from the 0/1/2/3 lters.
A pattern match is enabled by setting the corresponding PatternMatchEn bit in the
RxFilterWOLControl register to 1. This can be done separately for each of the four
lters. If the system is in power-down mode, if a pattern match detects a wake-up
event, the corresponding PatternMatch bit in the RxFilterStatus register is set. If the