English
Language : 

LAN9303 Datasheet, PDF (83/366 Pages) SMSC Corporation – Small Form Factor Three Port 10/100 Managed Ethernet Switch with Single MII/RMII/Turbo MII
Small Form Factor Three Port 10/100 Managed Ethernet Switch with Single MII/RMII/Turbo MII
Datasheet
The probability of a discard is programmable into the Random Discard Weight table via the Buffer
Manager Random Discard Table Command Register (BM_RNDM_DSCRD_TBL_CMD), Buffer
Manager Random Discard Table Write Data Register (BM_RNDM_DSCRD_TBL_WDATA), and Buffer
Manager Random Discard Table Read Data Register (BM_RNDM_DSCRD_TBL_RDATA). The
Random Discard Weight table contains sixteen entries, each 10-bits wide. Each entry corresponds to
a range of the average number of buffers used by the ingress port. Entry 0 is for 0 to 15 buffers, entry
1 is for 16 to 31 buffers, etc. The probability for each entry us set in 1/1024’s. For example, a setting
of 1 is 1-in-1024, or approximately 0.1%. A setting of all ones (1023) is 1023-in-1024, or approximately
99.9%.
Refer to Section 13.4.4.10, "Buffer Manager Random Discard Table Command Register
(BM_RNDM_DSCRD_TBL_CMD)," on page 326 for additional details on writing and reading the
Random Discard Weight table.
6.5.3 Transmit Queues
Once a packet has been completely received, it is queued for transmit. There are four queues per
transmit port, one for each level of transmit priority. Each queue is virtual (if there are no packets for
that port/priority, the queue is empty), and dynamic (a queue may be any length if there is enough
memory space). When a packet is read from the memory and sent out to the corresponding port, the
used buffers are released.
6.5.4 Transmit Priority Queue Servicing
When a transmit queue is non-empty, it is serviced and the packet is read from the buffer RAM and
sent to the transmit MAC. If there are multiple queues that require servicing, one of two methods may
be used: fixed priority ordering, or weighted round-robin ordering. If the Fixed Priority Queue Servicing
bit in the Buffer Manager Configuration Register (BM_CFG) is set, a strict order, fixed priority is
selected. Transmit queue 3 has the highest priority, followed by 2, 1, and 0. If the Fixed Priority Queue
Servicing bit in the Buffer Manager Configuration Register (BM_CFG) is cleared, a weighted round-
robin order is followed. Assuming all four queues are non-empty, the service is weighted with a 9:4:2:1
ratio (queue 3,2,1,0). The servicing is blended to avoid burstiness (e.g. queue 3, then queue 2, then
queue 3, etc.).
6.5.5 Egress Rate Limiting (Leaky Bucket)
For egress rate limiting, the leaky bucket algorithm is used on each output priority queue. For each
output port, the bandwidth that is used by each priority queue can be limited. If any egress queue
receives packets faster than the specified egress rate, packets will be accumulated in the packet
memory. After the memory is used, packet dropping or flow control will be triggered.
Note: Egress rate limiting occurs before the Transmit Priority Queue Servicing, such that a lower
priority queue will be serviced if a higher priority queue is being rate limited.
The egress limiting is enabled per priority queue. After a packet is selected to be sent, its length is
recorded. The switch then waits a programmable amount of time, scaled by the packet length, before
servicing that queue once again. The amount of time per byte is programmed into the Buffer Manager
Egress Rate registers (refer to Section 13.4.4.14 through Section 13.4.4.19 for detailed register
definitions). The value programmed is in approximately 20 nS per byte increments. Typical values are
listed in Table 6.5. When a port is transmitting at 10 Mbps, any setting above 39 has the effect of not
limiting the rate.
SMSC LAN9303/LAN9303i
83
DATASHEET
Revision 1.3 (08-27-09)