58 AT75C221 Preliminary 6033A–INTAP–03/04
In half-duplex mode, the transmitter checks carrier sense. If asserted, it waits for it to de-
assert and then starts transmission after the inter-frame gap of 96 bit-times.
If the collision signal is asserted during transmission, the transmitter transmits a jam
sequence of 32 bits taken from the data register and then retries transmission after the
backoff time has elapsed . An error i s indicated and a ny further attempts aborted if 16
attempts cause collisions.
If transmit DMA underruns, bad CRC is automatically appended using the same mecha-
nism as jam insertion. Underrun also causes TXER to be asserted.
Receiver Mode When a packet is received, it is checked for valid preamble, CRC, alignment, length and
address. If all these criteria are met, the packet is stored successfully in a receive buffer.
If at the end of reception the CRC is bad, then the received buffer is recovered. Eac h
received frame including CRC is written to a single receive buffer.
Receive buffer s are word-aligned and are capable of containing 1518 or 1522 bytes
(BIG = 1 in ETH_CFG) of data (the maximum length of an Ethernet frame).
The st art loc ation for ea ch rec eive d frame is s tored in m emory i n a l ist o f recei ve bu ffer
descriptor s at a locat ion pointed to by the receive buffer queue poin ter register. Each
entry in the li st consis ts of two w ords. The first word is the a ddress of t he receive d
buffer; the se co nd i s th e r ecei ve s ta tus . Tabl e 21 defi ne s an entry in the r ecei ve d bu ffer
descriptor list.
To receive frames, the buffer queue must be initialized by writing an appropriate
address to bits [31:2] in the first word of each l ist entry. Bit zero of word zero mus t be
written with zero.
After a frame is received, bit zero becomes set and the second word indicates what
caused the frame to be copied t o memory. T he start l ocation of the received bu ffer
descriptor li st should be written to the received buffer queue pointer regist er before
recei ve is enab led (by setting the rece ive ena ble bit in the netw ork cont rol reg ister) . As
soon as the received block s tarts writing received frame data to the receive FIFO, the
received buffer manager reads the first receive buffer location pointed to by the received
buffer queue pointer register. If the filter block is active, the frame s hould be copied to
memory; the receive data DMA operation starts writing data into the receive buffer. If an
error occurs , th e buffer is recovered . If the fra me is received without error, the queu e
entry is updated. The buffer pointer is rewritten to memory with its low-o rder bit set to
indicat e succ essfu l frame rece ption and a used buffer . The next word is written wit h the
length of the frame and how the destination address was recognized. Th e next receive
buffer location is then read from the following word or, if the current buffer pointer had its
wrap bi t set, the beg innin g of th e table . The maxi mum n umber of buffer poin ters be fore
a wrap bit is seen is 1024. If a wrap bit is not seen by then, a wrap bit is assumed in that
entry. The received buffer queue pointer register must be written with zero in its lower-
order bit positions to enable the wrap function to work correctly.
If bit zero is set when the receive buffer manager read s the location of the receive
buffer, then the buffer has already been used and cannot be used again until software
has processe d the frame and cl eared bit zero. In this case, the DMA block sets the
buffer un av ailabl e b it i n th e rec ei ved s tatu s register and tr i gge rs an in ter rupt. Th e fram e
is discarded and the queue entry is reread on reception of the next frame to see if the
buffer is now available. Each discarded frame increments a statistics register that is
cleared on being read. When there is network congestion, it is possible for the MAC to
be programmed to apply back pressure.
This is when half-d uplex mode collisions are forced on all received frames by transmit-
ting 64 bits of data (a default pattern).