Transmit side, Overview, Packet descriptors – Rainbow Electronics DS3131 User Manual
Page 97: Table 9-h. done-queue error-status conditions, Sparent mod

DS3131
97 of 174
9.3 Transmit Side
9.3.1 Overview
The transmit DMA uses a scatter-gather technique to read packet data from main memory. The host
keeps track of and decides from where (and when) the DMA should grab the outgoing packet data. A set
of descriptors that get handed back and forth between the host and the DMA tells the DMA where to
obtain the packet data, and the DMA can tell the host when the data has been transmitted.
The transmit DMA operation has three main areas, as shown in
Figure 9-10
,
Figure 9-11
, and
Table 9-G
.
The host writes to the pending queue, informing the DMA which channels have packet data ready to be
transmitted. Associated with each pending-queue descriptor is a data buffer that contains the actual data
payload of the HDLC packet. The data buffers can be between 1 and 8191 Bytes in length (inclusive). If
an outgoing packet requires more memory than a data buffer contains, the host can link the data buffers
to handle packets of any size.
The done-queue descriptors contain information that the DMA wishes to pass to the host. The DMA
writes to the done queue when it has completed transmitting either a complete packet or data buffer (see
below for the discussion on the DMA update to the done queue). Through the done-queue descriptors,
the DMA informs the host about the status of the outgoing packet data. If an error occurs in the
transmission, the done queue can be used by the host to recover the packet data that did not get
transmitted and the host can then re-queue the packets for transmission.
If enabled, the DMA can burst read the pending-queue descriptors and burst write the done-queue
descriptors. This helps minimize PCI bus accesses, freeing the PCI bus up to do more time-critical
functions. See Sections
9.3.3
and
9.3.4
for more details on this feature.
Table 9-G. Transmit DMA Main Operational Areas
DESCRIPTORS FUNCTION
SECTION
Packet
A dedicated area of memory that describes the location and attributes of the
packet data.
9.3.2
Pending Queue
A dedicated area of memory that the host writes to inform the DMA that
packet data is queued and ready for transmission.
9.3.3
Done Queue
A dedicated area of memory that the DMA writes to inform the host that the
packet data has been transmitted.
9.3.4
Host Linking of Data Buffers
As previously mentioned, the data buffers are limited to a length of 8191 Bytes. If an outgoing packet
requires more memory space than the available data buffer contains, the host can link multiple data
buffers together to handle a packet length of any size. The host does this through the end-of-frame (EOF)
bit in the packet descriptor. Each data buffer has a one-to-one association with a packet descriptor. If the
host wants to link multiple data buffers together, the EOF bit is set to 0 in all but the last data buffer.
Figure 9-10
shows an example for HDLC channel 5 where the host has linked three data buffers
together. The transmit DMA knows where to find the next data buffer when the EOF bit is set to 0
through the next descriptor pointer field.