Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 7/19/2024
Public
Document Table of Contents

5.1.7.5. EMAC Initialization and Configuration

The following EMAC configuration operations can be performed after DMA initialization. If the EMAC initialization and configuration is done before the DMA is set up, then enable the MAC receiver (last step below) only after the DMA is active. Otherwise, the received frame could fill the RX FIFO buffer and overflow.

  1. Provide the MAC address registers: MAC_Address0_High and MAC_Address0_Low. If more than one MAC address is enabled in the configuration (during configuration), program the MAC addresses appropriately.
  2. Program the following fields to set the appropriate filters for the incoming frames in the MAC_Frame_Filter register:
    • Receive All
    • Promiscuous mode
    • Hash or Perfect Filter
    • Unicast, multicast, broadcast, and control frames filter settings
  3. Program the following fields for proper flow control in the MAC_Q0_TX_Flow_Control register:
    • Pause time and other pause frame control bits
    • Receive and Transmit Flow control bits
    • Flow Control Busy
  4. Program the MAC_Interrupt_Enable register, as required, and if applicable, for your configuration. Program the appropriate fields in the MAC_Tx_Configuration and MAC_Rx_Configuration registers. For example, inter-packet gap while transmission and jabber disable.
  5. Set bit 0 in both the MAC_Tx_Configuration and MAC_Rx_Configuration registers to start the MAC transmitter and receiver.

To support jumbo packets:

  • For transmit side, program the JD field in the MAC_Tx_Configuration register to 1.
  • For receive side, program the WD field in the MAC_Rx_Configuration register to 1.