Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 11/27/2024
Public
Document Table of Contents

5.1.6.4. Checksum Offload Engine (COE)

Communication protocols such as TCP/UDP implement checksum fields, which are useful to determine the integrity of the data transmitted over a network. Because the most widespread use of Ethernet is to encapsulate TCP/UDP over IP datagrams, the EMAC subsystem has an optional checksum offload engine (COE) to support checksum calculation and insertion in the transmit path, and error detection in the receive path.

The checksum offload engine supports two types of checksum calculation and insertion:
  • IP Header Checksum Engine - In IPv4 datagrams, the integrity of the header fields is indicated by the 16-bit header checksum field (the 11th and 12th bytes of the IPv4 datagram). The COE detects an IPv4 datagram when the type field of Ethernet packet has the value 0x0800 and the version field of IP datagram has the value 0x4. The checksum field of the input packet is ignored during calculation and replaced with the calculated value.
  • TCP/UDP/ICMP Checksum Engine - The TCP/UDP/ICMP checksum engine processes the IPv4 or IPv6 header (including extension headers) and determines whether the encapsulated payload is TCP, UDP, or ICMP. The checksum is calculated for the TCP, UDP, or ICMP payload and inserted into its corresponding field in the header.