Forum Discussion
Hi,
This applies to both transmitted and received packets.
Basic Ethernet frame format consists of 7 bytes (preamble), 1 byte (SFD), 6 bytes (Destination Address), 6 bytes (Sources Address), 2 bytes (Length), payload, and so on. The total bytes number before the payload is 22 bytes, in order to make the payload is 32 bits align at the Avalon interface, two bytes has to add before the payload.
For the receiver, MAC adds two-byte zeros at the Avalon ST RX 32 bit interfaces, so that the payload will align to 32 bits boundary.
For the transmitter, the application layer sends the ethernet packet which is payload alignment to the Avalon ST TX 32 bit interfaces, and then MAC removes the additional two bytes (zero) from the beginning of ethernet frames.
From the IP GUI, you have to enable the “Align Packet headers to 32-bit boundary” option, and you can refer to the tx_cmd_stat(bit 18) and rx_cmd_stat(bit 25) command registers to run-time control the payload alignment (if needed) after turn on the “Align packet headers to 32-bit boundaries” option.
Regards -SK