1.3 FUNCTIONAL DESCRIPTION
1.3.1
SERIAL
DATA
HANDLING
The basic operation of the chip set to provide the Ethernet interface
is
as
follows.
In
the transmit
mode (since there is
only one transmission path, Ethernet is a half duplex system), the LANCE
reads data from a transmit buffer
by
using Direct Memory Access (DMA) and appends the pream-
ble,
sync pattern (two ones after alternating ones and zeros
in
the preamble), and calculates
and appends the complement of the 32-bit
CRC.
The first eight words of the transmit buffer
must contain the destination address, source address,
ar<1
type field as detailed
in
the Ethernet
specification.
In
the receive mode, the destination address, source address, type, data, and
eRe
fields are transferred to memory via DMA cycles. The
eRC
is
calculated as the data and transmit-
ted CRC are received.
At
the end of the packet, if this calculated CRC does not agree with a
constant,
an
error bit is set and
in
RMD1
of the receiver descriptor rings.
In
the receive mode,
packets will
be
accepted by the LANCE under four modes of operation. The first mode
is
a full
comparison of the 48·bit destination address
in
the packet with the node address that
was
programmed into the LANCE during an initialization cycle. There are two types of logical address.
One
is
a group type mask where the 48-bit address
in
the packet is put through a hash filter
in
order to map the 48-bit physical addresses into 1 of 64 logical groups. This mode can be
useful if sending packets to all of one type of a device simultaneously or the network
(i.e.
sending a packet to all file servers or all printer servers). The second logical address is the broadcast address where all nodes
on
the network receive the packet. The last receive mode of
operation is the
so
called "promiscuous mode"
in
which a node will accept all packets on
the network cable regardless of their destination address.
1.3.2 COLLISION DETECTION AND IMPLEMENTATION
The Ethernet CSMAlCD network access algorithm
is
implemented completely within the LANCE.
In
addition to listening for a clear network cable before transmitting, Ethernet handles collisions
in
a predetermined
way.
Should two transmitters attempt to seize the network cable at the same
time, they
will collide, and the data on the network cable will be garbled. LANCE is constantly
monitoring the
CLSN (Collision) pin. This signal
is
generated by the transceiver when the signal
level
on
the network cable indicates the presence of signals from two or more transmitters. If
LANCE
is
transmitting when CLSN
is
asserted, it will continue to transmit the preamble, (nor·
mally collisions will
occur while the preamble is being transmitted) then will
"jam"
the network
for 32 bit times (3.2 microseconds). This jamming ensures that
all nodes have enough time to
detect the
collision. The transmitting nodes then delay a random amount of time according to
the
"truncated binary backoff" algorithm defined
in
the Ethernet specification to minimize the
probability of the
colliding nodes having multiple collisions with each other. After
16
abortive
attempts to transmit a packet,
LANCE will report a RTRY error due to excessive collisions and
step over the transmit buffer. During reception, the detection of a collision causes that reception
to be aborted. Depending on when the
collision occurred, LANCE will treat this packet
as
an
error packet if the packet has
an
address mismatch, as a runt packet (a packet that has less
than 64 bytes), or as a legal length packet with a CRC error. Extensive error reporting is provided by the LANCE through a microprocessor interrupt and error bits
in
a status register. The
following are the significant error conditions: CRC error on received data; transmitter on longer
than
1518
bytes; missed packet error (meaning a packet on the network cable was missed
because there were no empty buffers
in
memory), and memory error,
in
which the memory did
not respond (handshake)
to
a memory cycle request.
1.3.3
BUFFER MANAGEMENT
A key feature of the LANCE and its
on
board DMA channel is the flexibility and speed of communication between the LANCE and the host microprocessor through common memory loca·
tions. The basic organization of the buffer management is a circular queue of tasks
in
memory
called descriptor rings, as shown
in
Figure
6.
There are separate descriptor rings to describe
transmit and receive operations. Up to
128
tasks may be queued up on a descriptor ring awaiting
execution by the LANCE. Each entry
in
a descriptor ring holds a pointer to a data memory buf·
fer and
an
entry for the length of the data buffer. Data buffers can be chained or cascaded in
order to handle a long packet
in
multiple data buffer areas. The LANCE searches the descriptor
1·101
1-5