
CHAPTER 5 SAR FUNCTION
186
5.5.5 Receive Operation
(1) Receive operation
The
μ
PD98405 receives cells from the PHY layer, and stores them to the receive FIFO. The receive FIFO
has a capacity of 96 cells. If the VPI/VCI pattern of the header of the incoming cell consists entirely of
zeroes, the cell is recognized as being an invalid cell. It is not stored to the receive FIFO, and instead is
discarded.
If the cell is not an unassigned or idle cell, an address that indicates the lookup table in control memory is
created from the 24-bit pattern of the VPI/VCI, in accordance with the setting of the "SHIFT" and "MASK"
fields of the VRR register.
The entry of the lookup table indicating the created address is read. If the enable bit (ENBL bit) is set to
"1," the cell is stored to the receive FIFO and processing continues. If the ENBL bit is set to "0," indicating
that mapping to the lookup table is not performed, the cell is discarded.
When the ENBL bit = 1, the VC table of the free block pool is read from the "VC NUMBER" stored in the
lookup table together with the ENBL bit, and the pool number or address information of the system memory
to be stored is obtained.
If the cell is the first cell of a packet to which no batch of the receive pool is allocated, or if the current batch
has been exhausted, the
μ
PD98405 fetches a new batch from the "ADDRESS" field of the pool descriptor
in the receive free buffer pool pointer area of control memory.
Once a new batch has been fetched, the value of the "REMAINING NUMBER OF BATCHES IN THE
POOL" field of the pool descriptor is decremented by one, and the "ADDRESS" field is changed to indicate
the first address of the next batch.
The
μ
PD98405 transfers a segment (48-byte payload of the receive cell) to the first buffer in system
memory by means of DMA. The free buffer address of the fetched batch is stored to the VC table, and is
updated each time the
μ
PD98405 transfers a segment. The pool descriptor is accessed whenever a new
batch is necessary.
If the cell is the first cell of a packet, the T1 time stamp is stored to the VC table, after which the VC table is
added to the T1 link list (only when the T1 timer function of the VC is enabled).
Each time the
μ
PD98405 receives a cell of the VC, it transfers the cell to system memory in units of
segments, and updates the free buffer address. It also calculates the CRC-32 and packet length for each
segment, and updates the process in the VC table.
If the free buffer used by the VC becomes full before the last cell of the packet has been received, the
μ
PD98405 fetches the address of a new free buffer from the batch in system memory. When the
μ
PD98405 has exhausted that batch, it fetches a new batch from the pool descriptor.
If one packet straddles two or more batches, the
μ
PD98405 overwrites the link pointer of the batch it has
used to modify the chain.