
MB86976
Fujitsu Microelectronics, Inc.
21
Advanced 11/5/98
Table Entry Format
where:
Notes: 1.
The look-up table must be loaded in a sequential manner, so
that as one traverses it, the word offset field never decreases.
Multiple filter strings must be interleaved to ensure this
2.
The user must ensure that conflicting table entries are not
present, e.g., two filter sequences that are both true for a given
frame yet have conflicting Destination fields.
Look-up Table Processing
As each new frame is received from the LAN port, the following
steps are performed:
1.
Upon reception of the first word of a frame from the MAC core,
the word offset counter is reset to 0. In addition, the 8 compare
result registers are set to 0.
2.
As each additional word is received, the word offset counter is
incremented accordingly.
3.
When the current table entry’s word offset value equals the value
of the word offset counter, the comparison is performed using the
data, mask, and operation values associated with this table entry.
4.
The result of the comparison is stored into one of 8 compare result
registers as indexed by the value of the filter id field. The result of
the comparison (1 = true, 0 = false) is logically ANDed with the
current value of the compare result register and stored in its place.
If the start field is 1, indicating the start of a filter sequence, only
the result of the comparison is stored in the compare result regis-
ter.
5.
The table entry index value is then incremented to the next valid
table entry and steps 3 and 4 repeated.
6.
When the end of any filter sequence is reached (the stop field
equals 1), the content of the corresponding compare result
register is examined.
If the entire filter string was found within the frame, the value is 1
and the content of the Destination field is used along with the
results of the Destination Address filtering process to deter-
mine the destination of the frame.
If the entire filter string was not found within the frame, the value
is 0 and the Destination field is ignored.
bit[15]
bit[14:10]
bit[9:8]
bit[7]
bit[6]
bit[5:3]
bit[2]
bit[1:0]
enable
word offset
destination
start
stop
filter id
unused
operation
data value
mask value
Bit Field
Description
enable
0 = filter is disabled, 1 = filter is enabled
word offset
Number of 16-bit words, referenced from the start of the Destination Address, where the filter begins.
destination
00 = reject
01 = forward to CPU only
10 = forward to WAN transmit port only
11 = forward to both the CPU and WAN transmit port
start
1 = indicates the start of a new filter string, otherwise 0
stop
1 = indicates the end of a filter string, otherwise 0
filter id
Indicates to which filter string this filter word belongs.
operations
00 = “=”, if “(comparand && mask)= data” comparison returns true
01 = “<“, if “(comparand && mask)< data” comparison returns true
10 = “>“, if “(comparand && mask)> data” comparison returns true
11 = invalid operation
data value
“Raw” data field. Bits which are to be masked are set to 0.
mask value
Mask which is applied to the comparand prior to the comparison.
0 = ignore this bit.
1 = use this bit in the comparison
E.g., a mask value of FFFFh directs the comparator to use all 16 bits in the comparison operation.