2 global buffer allocation, Global buffer allocation -66, Receive static buffer allocation example -66 – Motorola MPC8260 User Manual

Page 846

Advertising
background image

29-66

MPC8260 PowerQUICC II UserÕs Manual

MOTOROLA

Part IV. Communications Processor Module

Figure 29-42. Receive Static Buffer Allocation Example

29.10.5.2.2 Global Buffer Allocation
The user prepares a table of BDs without assigning buffers to them (no buffer pointers). The
address of the Þrst BD is put into the channelÕs RCT[RBD_BASE]. The user also prepares
sets of free buffers (of size RCT[MRBLR]) in up to four free buffer pools (chosen in
RCT[BPOOL]); see Section 29.10.5.2.3, ÒFree Buffer Pools.Ó

When an ATM cell arrives, the CP opens the Þrst BD in the table, fetches a buffer pointer
from the free buffer pool associated with this channel, and writes the pointer to
RxBD[RXDBPTR], the receive data buffer pointer Þeld in the BD. When the current buffer
is full, the CP increments RBD_Offset, which is the offset from the RBD_BASE to the
current BD, and reads the next BD in the table. If the BD is empty (RxBD[E] = 1), the CP
fetches another buffer pointer from the free buffer pool and reception continues. If the BD
is not empty, a busy condition occurs and a busy interrupt is sent to the event queue
specifying the ATM channel code. As software then processes each full buffer (RxBD[E] =
0), it sets RxBD[E] and copies the buffer pointer back to the free buffer pool.

Figure 29-43 shows two ATM channelsÕ BD tables and one free buffer pool. Both channels
are associated with free buffer pool 1. The CP allocates the Þrst two buffers of buffer pool
1 to channel 1 and the third to channel 4.

Rx Buffer 1 of Channel 1

Rx Buffer 2 of Channel 1

Rx Buffer 3 of Channel 1

Rx Buffer 4 of Channel 1

Rx Buffer 5 of Channel 1

Ch1 RxBD Table

0

BD 1

1

BD 2

1

BD 3

0

BD 4

0

BD 5

RBD_BASE

RBD_Offset

Note: The shaded buffers are empty; unshaded buffers are waiting to be processed.

Ch1 RxBD Table

Pointers in the RCT

Rx Buffer 1 of Channel 4

Rx Buffer 2 of Channel 4

Rx Buffer 3 of Channel 4

Rx Buffer 4 of Channel 4

Rx Buffer 5 of Channel 4

Ch4 RxBD Table

1

BD 1

0

BD 2

0

BD 3

0

BD 4

0

BD 5

RBD_BASE

RBD_Offset

Ch4 RxBD Table

Pointers in the RCT

1

BD 6

BD 7

Rx Buffer 6 of Channel 4

Rx Buffer 7 of Channel 4

1

Advertising