User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 498
UG585 (v1.11) September 27, 2016
Chapter 16: Gigabit Ethernet Controller
Other than underflow, the only MAC related errors that can occur are due to collisions during half
duplex transmissions. When a collision occurs the frame still exists in the packet buffer memory so it
can be retried directly from there. Only when the MAC transmitter has failed to transmit after sixteen
attempts is the frame finally flushed from the packet buffer.
Rx Packet Buffer
The receive packet buffer stores frames from the MAC receiver along with their status and statistics.
Frames with errors are flushed from the packet buffer memory, good frames are pushed onto the
DMA AHB interface.
The receiver packet buffer monitors the FIFO writes from the MAC receiver and translates the FIFO
pushes into packet buffer writes. At the end of the received frame the status and statistics are
buffered so that the information can be used when the frame is read out. When programmed in full
store and forward mode, if the frame has an error the frame data is immediately flushed from the
packet buffer memory allowing subsequent frames to utilize the freed up space. The status and
statistics for bad frames are still used to update the controller’s registers.
Note: To accommodate the status and statistics associated with each frame, three words per packet
are reserved at the end of the packet data. If the packet was bad and requires to be dropped, the
status and statistics are the only information held on that packet.
The receiver packet buffer also detects a full condition such that an overflow condition can be
detected. If this occurs, subsequent packets are dropped and an RX overflow interrupt is raised.
The DMA only begins packet fetches when the status and statistics for a frame are available. If the
frame has a bad status due to a frame error, the status and statistics are passed onto the controller’s
registers. If the frame has a good status, the information is used to read the frame from the packet
buffer memory and burst onto the AHB using the DMA buffer management protocol. After the last
frame data has been transferred to the FIFO, the status and statistics are updated to the controller’s
registers.
16.2.6 Checksum Offloading
The controller can be programmed to perform IP, TCP, and UDP checksum offloading in both receive
and transmit directions, enabled by setting bit [24] in the Network Configuration register for receive,
and bit [11] in the DMA Configuration register for transmit.
IPv4 packets contain a 16-bit checksum field, which is the 16-bit 1's complement of the 1's
complement sum of all 16-bit words in the header. TCP and UDP packets contain a 16-bit checksum
field, which is the 16-bit 1's complement of the 1's complement sum of all 16-bit words in the header,
the data, and a conceptual IP pseudo header.
To calculate these checksums in software requires each byte of the packet to be processed. For TCP
and UDP this can use a large amount of processing power. Offloading the checksum calculation to
hardware can result in significant performance improvements.
For IP, TCP, or UDP checksum offload to be useful, the operating system containing the protocol stack
must be aware that this offload is available so that it can make use of the fact that the hardware can
either generate or verify the checksum.