beautypg.com

NEC Network Controller uPD98502 User Manual

Page 264

background image

CHAPTER 4 ATM CELL PROCESSOR

264

Preliminary User’s Manual S15543EJ1V0UM

4.8.2.1 Transmission procedure

(a) Setting transmitting data

Before transmitting a packet, V

R

4120A places a packet data to be sent in system memory and sets the packet

descriptor.

(b) Opening the send channel

If V

R

4120A needs a new channel for transmitting of the packet data, V

R

4120A issues Open_Channel

command. When V

R

4120A issues the command, ATM Cell Processor assigns a new VC Table pool block in

Work RAM and reports its start address to V

R

4120A using a command indication.

(c) Setting the send VC table

The assigned 16-word VC Table pool block in Work RAM is set as the send VC table for each VC.

(d) Issuing the Tx_Ready command -> making preparations for transmission of the first cell

When V

R

4120A issues Tx_Ready command, ATM Cell Processor sets a Packet Info Structure in Work RAM,

fetch the packet descriptor and store it in the area. ATM Cell Processor checks Transmit Queue if any packet

is waiting for transmission. If Transmit Queue is not empty, ATM Cell Processor adds the Packet Info structure

at the end of the queue. If no packet is waiting in the queue, ATM Cell Processor also schedules next

transmission time with “current time plus 1”.

(e) Sending a cell

<1> Generating a header

A header is generated from Word1 in the VC table and written into SAR FIFO. "00H" is inserted into the

GFC field of the header.

<2> Sending a segment data from system memory to SAR_FIFO

ATM Cell Processor reads a transmitting segment (48-byte payload data of the cell) from system memory

and sets it in SAR_FIFO using Scatter/Gather DMA. The starting address of the segment is indicated by

the "Buffer Read Address" field in the VC table. When the 53rd byte of the segment is written, SAR FIFO

is updated.

<3> Calculating the CRC-32 value and the length

Each time a segment is read from SDRAM, the CRC-32 value is calculated for that segment and

transmitted bytes are also counted. ATM Cell Processor writes those results in VC table.

<4> Updating the VC table

Updates "Buffer Read Address" and "Remaining Bytes in Current Buffer" fields.

(f) Sending the last cell

When the L flag of the current transmit buffer indicates that the buffer is the last one and the value in the field

indicating the number of bytes remaining in the VC table is less than 40 bytes, the cell is the last cell of the

packet.

<1> When the current cell is the last cell of the packet, and the remaining payload data is less than 40 bytes,

zero padding and the 8 byte trailer are added. When the remaining payload data is more than 40 bytes

and there are not enough space to add an 8-byte AAL-5 trailer, ATM Cell Processor just adds zero

padding to make a 48-byte payload and ATM Cell Processor sends a cell containing only a trailer and

padding next.

<2> When the last segment of the AAL-5 PDU is read, the final CRC-32 value and the packet length are

inserted into the trailer of the AAL-5 PDU, and the contents of the first word in the VC table are inserted

into the CPCS-UU and CPI fields, thereby completing the AAL-5 trailer.

(g) ATM Cell Processor checks whether there is a subsequent packet (checks Last Packet Info address and First

Packet Info address in Tx VC table). When a subsequent packet exists, (e) and (f) are repeated.

(h) For each packet, ATM Cell Processor stores transmitting indication as a status information in the mailbox and

generates an interrupt.

(i) V

R

4120A reads the mailbox and updates the read pointer of the mailbox.