Information

Enhanced Three-Speed Ethernet Controllers
MPC8308 PowerQUICC II Pro Processor Reference Manual, Rev. 1
Freescale Semiconductor 16-153
16.6.4.3.1 Priority-Based Queuing (PBQ)
PBQ is the simplest scheduler decision policy. The enabled TxBD rings are assigned a priority value based
on their index. Rings with a lower index have precedence over rings with higher indices, with priority
assessed on a frame-by-frame basis. For example, frames in TxBD ring 0 have higher priority than frames
in TxBD ring 1, and frames in TxBD ring 1 have higher priority than frames in TxBD ring 2, and so on.
The scheduling decision is then achieved as follows:
loop
# start or S/W clear of TSATn
ring = 0;
while ring <= 7 loop
if enabled(ring) and not ring_empty(ring) then
transmit_frame(ring);
ring = 0;
else
ring = ring + 1;
endif
endloop
endloop
16.6.4.3.2 Modified Weighted Round-Robin Queuing (MWRR)
eTSEC implements a modified weighted round-robin scheduling algorithm across all enabled TxBD rings
when TCTRL[TXSCHED] = 10. In MWRR, the weights in the TR03WT and TR47WT registers
determine the ideal size of each transmit slot, as measured in multiples of 64 bytes. Thus, to set a transmit
slot of 512 bytes, a weight of 512/64 or 8 needs to be set for the ring. In this mode TxBD rings 1–7 are
selected in round-robin fashion, whereas TxBD ring 0, if enabled with ready data for transmission, is
always selected in between other rings so as to expedite transmission from ring 0.
The scheduling decision is then achieved as follows:
for ring = 1..7 and enabled(ring) loop
credit[ring] = 0;
endloop
for ring = 1..7 and enabled(ring) loop
if not ring_empty(0) then
credit[0] = credit[0] + weight[0];
while credit[0] > 0 loop
transmit_frame(0);
credit[0] = credit[0] - frame_size;
if ring_empty(0) then
credit[0] = 0;
endif
endloop
endif
if not ring_empty(ring) then
credit[ring] = credit[ring] + weight[ring];
endif
while credit[ring] > 0 loop
transmit_frame(ring);
credit[ring] = credit[ring] - frame_size;