2 global buffer allocation, Global buffer allocation -68, Receive static buffer allocation example -68 – Freescale Semiconductor MPC8260 User Manual

Page 988

Advertising
background image

ATM Controller and AAL0, AAL1, and AAL5

MPC8260 PowerQUICC II Family Reference Manual, Rev. 2

30-68

Freescale Semiconductor

Figure 30-42. Receive Static Buffer Allocation Example

30.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
first 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 30.10.5.2.3, “Free

Buffer Pools.

When an ATM cell arrives, the CP opens the first 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 field 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 30-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 first 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