| 数据搜索系统,热门电子元器件搜索 |
|
ENC28J60-C/SP 数据表(PDF) 53 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
ENC28J60-C/SP 数据表(HTML) 53 Page - Microchip Technology |
|
53 / 96 page ![]() © 2006 Microchip Technology Inc. Preliminary DS39662B-page 51 ENC28J60 8.1 Unicast Filter The unicast receive filter checks the destination address of all incoming packets. If the destination address exactly matches the contents of the MAADR registers, the packet will meet the unicast filter criteria. 8.2 Pattern Match Filter The pattern match filter selects up to 64 bytes from the incoming packet and calculates an IP checksum of the bytes. The checksum is then compared to the EPMCS registers. The packet meets the pattern match filter criteria if the calculated checksum matches the EPMCS registers. The pattern match filter may be useful for filtering packets which have expected data inside them. To use the pattern match filter, the host controller must program the pattern match offset (EPMOH:EPMOL), all of the pattern match mask bytes (EPMM7:EPMM0) and the pattern match checksum register pair (EPMCSH:EPMCSL). The pattern match offset should be loaded with the offset from the beginning of the des- tination address field to the 64-byte window which will be used for the checksum computation. Within the 64-byte window, each individual byte can be selectively included or excluded from the checksum computation by setting or clearing the respective bit in the pattern match mask. If a packet is received which would cause the 64 byte window to extend past the end of the CRC, the filter criteria will immediately not be met, even if the corresponding mask bits are all ‘0’. The pattern match checksum registers should be programmed to the checksum which is expected for the selected bytes. The checksum is calculated in the same manner that the DMA module calculates checksums (see Section 13.2 “Checksum Calculations”). Data bytes which have corresponding mask bits programmed to ‘0’ are completely removed for purposes of calculating the checksum, as opposed to treating the data bytes as zero. As an example, if the application wished to filter all packets having a particular source MAC address of 00-04-A3-FF-FF-FF, it could program the pattern match offset to 0000h and then set bits 6 and 7 of EPMM0 and bits 0, 1, 2 and 3 of EPMM1 (assuming all other mask bits are ‘0’). The proper checksum to program into the EPMCS registers would be 0x5BFC. As an alternative configuration, it could program the offset to 0006h and set bits 0, 1, 2, 3, 4 and 5 of EPMM0. The checksum would still be 5BFCh. However, the second case would be less desirable as packets less than 70 bytes long could never meet the pattern match criteria, even if they would generate the proper checksum given the mask configuration. Another example of a pattern matching filter is illustrated in Figure 8-3. FIGURE 8-3: SAMPLE PATTERN MATCH FORMAT SA EMPOH:EPMOL = 0006h FCS DA Type/Length Data Bytes used for Checksum Computation EPMM7:EPMM0 = 0000000000001F0Ah 11 22 33 44 55 66 77 88 99 AA BB CC 00 5A 09 0A 0B 0C 0D . . . 40 . . . FE 45 23 01 Received Data Field 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 . . . 70 . . . Byte # 64-byte Window used for Pattern Match Input Configuration: Values used for Checksum Computation = {88h, AAh, 09h, 0Ah, 0Bh, 0Ch, 0Dh, 00h} EPMCSH:EPMCSL = 563Fh Note: Received data is shown in hexadecimal. Byte numbers are shown in decimal format. (00h padding byte added by hardware) |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |