GR740-UM-DS, Nov 2017, Version 1.7
207
www.cobham.com/gaisler
GR740
hold transmission status. The Transmit Error (TE) bit is set each time an transmission ended with an
error (when at least one of the three status bits in the transmit descriptor has been set). The Transmit
Successful (TI) is set each time a transmission ended successfully.
The Transmit AHB Error (TA) bit is set when an AHB error was encountered either when reading a
descriptor, reading packet data or writing status to the descriptor. Any active transmissions are aborted
and the transmitter is disabled. The transmitter can be activated again by setting the transmit enable
register. See also the AMBA ERROR propagation description in section 5.10.
14.3.4 Setting up the data for transmission
The data to be transmitted should be placed beginning at the address pointed by the descriptor address
field. The GRETH_GBIT does not add the Ethernet address and type fields so they must also be
stored in the data buffer. The 4 B Ethernet CRC is automatically appended at the end of each packet.
Each descriptor will be sent as a single Ethernet packet. If the size field in a descriptor is greater than
1514 B, the packet will not be sent.
14.3.5 Scatter Gather I/O
A packet can be generated from data fetched from several descriptors. This is called Scatter Gather I/
O. The More (MO) bit should be set to 1 to indicate that more descriptors should be used to generate
the current packet. When data from the current descriptor has been read to the RAM the next descrip-
tor is fetched and the new data is appended to the previous data. This continues until a descriptor with
the MO bit set to 0 is encountered. The packet will then be transmitted.
Status is written immediately when data has been read to RAM for descriptors with MO set to 1. The
status bits are always set to 0 since no transmission has occurred. The status bits will be written to the
last descriptor for the packet (which had MO set to 0) when the transmission has finished.
No interrupts are generated for descriptors with MO set to 1 so the IE bit is don’t care in this case.
The checksum offload control bits (explained in section 14.3.6) must be set to the same values for all
descriptors used for a single packet.
14.3.6 Checksum offloading
Support is provided for checksum calculations in hardware for TCP and UDP over IPv4. The check-
sum calculations are enabled in each descriptor and applies only to that packet (when the MO bit is set
all descriptors used for a single packet must have the checksum control bits set in the same way).
The IP Checksum bit (IC) enables IP header checksum calculations. If an IPv4 packet is detected
when transmitting the packet associated with the descriptor the header checksum is calculated and
inserted. If TCP Checksum (TC) is set the TCP checksum is calculated and inserted if an TCP/IPv4
packet is detected. Finally, if the UDP Checksum bit is set the UDP checksum is calculated and
inserted if a UDP/IPv4 packet is detected. In the case of fragmented IP packets, checksums for TCP
and UDP are only inserted for the first fragment (which contains the TCP or UDP header).
14.4
Rx DMA interface
The receiver DMA interface is used for receiving data from an Ethernet network. The reception is
done using descriptors located in memory.
14.4.1 Setting up descriptors
A single descriptor is shown in table 227 and 228. The address field points at the location where the
received data should be stored. There are no restrictions on alignment. The GRETH_GBIT will never
store more than 1518 B to the buffer (the tagged maximum frame size excluding CRC). The CRC
field (4 B) is never stored to memory so it is not included in this number. If the interrupt enable (IE)
bit is set, an interrupt will be generated when a packet has been received to this buffer (this requires