
8.0
BUFFER STRUCTURING AND DATA
MOVEMENT PROCESSES
8.1
TRANSMIT PACKETS
8.1.1
A packet for transmission is placed by the host into
buffer memory. This packet must include the DA,
SA, and data fields. The preamble, SFD, and CRC
(normally) are not included in the buffer. If CRC
generation is suppressed, the CRC field for the
packet is also supplied by the host. The packet is
placed in a contiguous block of memory in the
buffer, starting on a 256-byte boundary.
Single Packet Transmission
Valid 802.3 packets have at least 48 bytes of data.
If less data is to be transmitted on an 802.3 network,
it is the responsibility of the host to build a packet
with pad data included. The 83C795 will transmit
frames of any programmed length (greater than 17
bytes), even those which are too short to be valid
frames in an 802.3 network. DMA will transfer the
number of bytes programmed into the TCNTH and
TCNTL Register pair starting from address
(TSTART * 100H).
8.1.2
To support multiple transmissions per command, a
transmit queue can be enabled by setting the
ALTEGO bit in the Enhancement Register (ENH.5).
In this mode, a table of frame descriptors defines
the starting location and length of all enqueued
transmissions. This descriptor table is processed in
a circular manner by the LAN controller.
Multiple Packet Transmissions
The table is treated as a ring of entries whose
starting and ending points are defined by a pair of
registers (TBEGIN and TE ND) in the LAN
controller. These registers are initialized with the
upper 8-bits of address for the first location of the
table and the first location after the end of the table.
TEND is not within the table. When table processing
reaches the location defined by TEND, it is switched
back to TBEGIN. The table must be aligned with
256 byte boundary in the buffer memory. Each entry
is 8 bytes long. The format of this buffering is
defined in Figure 8-1.
To send multiple transmissions, the driver builds the
frames in buffer memory in the same contiguous
form presently expected. The driver then adds an
entry for each frame into a table of transmit
descriptors. This entry contains the starting location
and length, and transmit configuration for each
frame in the transmit queue. Places are provided in
the table for return of the Transmit Status (TSTAT)
Register and collision count associated with each
transmission. A simple semaphore protocol will be
used to control ownership of transmit buffers.
The LAN controller keeps a pointer in the TTABH
and TTABL Registers to the transmit descriptor
table. This pointer is initialized by the driver when
the table is first built and should not need
re-initialization thereafter. When transmit command
has been set and device is online, transmit begins
from the entry pointed to by the TTABH and TTABL
Registers. The LAN controller first checks the
TSTAT field. If it encounters a field equal to FF, it
will attempt to transmit the frame pointed to by the
entry. The status field will be changed to zero after
the remainder of the entry has been read. When it
encounters a TSTAT field not equal to FF, no frame
will be sent, the transmit complete interrupt will be
sent and the field will not be altered.
If the frame is marked for transmission, the DMA
controller loads its TSTARTH, TSTARTL, TCNTH,
TCNTL, and TCON Registers from the descriptor.
TSTAT gets marked as having been opened by the
LAN controller and transmission proceeds as with
single transmissions except that when the
transmission has completed, the transmit status
and collision count are moved by DMA into the
table. The table pointer is updated and transmission
of next entry begins.
If a transmit abort occurs (too many collisions) the
transmitter will stop processing the chain and post
the current transmit and interrupt status. If the
CMD.STP bit is set, the transmission of any
ongoing frame proceeds until completion or abort
but no successive frames in the chain are
processed. The TTAB indices will point to the first
unprocessed frame in the table so that none are
lost.
An alternative mode of controlling the transmit
interrupt can be enabled by the EOTINT bit in the
Enhancement (ENH) Register. When enabled, the
transmit interrupt will be generated only upon
83C795
BUFFER STRUCTURING AND DATA MOVEMENT PROCESSES
80