BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
280
Section 9: Ethernet MACs
Document
1250_1125-UM100CB-R
R
ECEIVE
DMA C
HANNEL
S
ELECTION
If a packet is accepted by the address filter the received DMA channel is selected. This is done by extracting
eight bits out of the first 128 bytes received (if the rx_rl_thrsh threshold is set smaller than 128 then the eight
bits must be in the rx_rl_thrsh bytes), and using them to lookup a two bit number in a small table formed using
the
mac_chup
and
mac_chlo
registers. The offset into the packet is specified in nibbles (half bytes) in the
mac_cfg
register, enabling extraction of the DiffServ code point from the IP v6 traffic class field as well as the
(byte aligned) IP v4 TOS field (see
). If the two bit number is zero the packet will be received on DMA
channel zero, otherwise DMA channel 1 is used. Both bits get written in to the packet receive status
information.
Figure 57: Receive Channel Selection
The channel select offset can be used to select any nibble in the first 128 bytes of the packet. For example if
selection is to be made based on the low byte of the Ethernet packet type (which is the second byte of the field
sent on the wire) the offset should be (decimal) 26.
shows how this offset is obtained. Even offsets refer to bytes in the received packets, odd offsets
straddle bytes: the high four bits of the index byte come from the low four bits of the later byte in the frame and
the low four bits of the index byte are the high four bits of the earlier byte in the frame. In the example a
complete byte from the frame is used so the bottom bit of the offset will be zero. The upper bits are simply the
byte offset (starting from 0) of the desired byte which is 13 for the second byte of the length/type field.
Figure 58: Selecting the Channel Offset
S
O
P
8
Bits
rx_rl_thrsh
ch_sel_offset
Received packet
Channel Number sent to DMA descriptor
The bits select the DMA channel used: 2’b00 for channel 0 else channel 1
256
Entries
2 bits
index
7
0
7
0
0
7
0
7
0
7
0
7
0
7
7
0
0
7
0
7
0
7
0
7
0
offset
field
7
0
7
S
A
D
A
LEN
TYPE
1B
19
17
15
13
11
0F
0D
0B
09
07
05
03
01
1C
1A
18
16
14
12
10
0E
0C
0A
08
06
04
02
00