![]() |
axiethernet
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XAxiEthernet_Config |
| Holds configuration information for an AXI Ethernet device. More... | |
| struct | XAxiEthernet |
| struct XAxiEthernet is the type for Axi Ethernet driver instance data. More... | |
Macros | |
| #define | XAE_MDIO_DIV_DFT 29 |
| Default MDIO clock divisor. More... | |
| #define | XAE_TPID_MAX_ENTRIES 4 |
| Number of storable TPIDs in the VLAN table. More... | |
| #define | XAE_RX 1 |
| Receive direction. More... | |
| #define | XAE_TX 2 |
| Transmit direction. More... | |
| #define | AXIETHERNET_DEVICE_ID XPAR_AXIETHERNET_0_DEVICE_ID |
| The following constants map to the XPAR parameters created in the. More... | |
| #define | AVB_PTP_RX_INTERRUPT_ID XPAR_INTC_0_AXIETHERNET_0_AV_INTERRUPT_PTP_RX_VEC_ID |
| AVB PTP receive interrupt ID. More... | |
| #define | AVB_PTP_INTERRUPT_ID XPAR_INTC_0_AXIETHERNET_0_AV_INTERRUPT_10MS_VEC_ID |
| AVB PTP timer interrupt ID. More... | |
| #define | PHY_DETECT_REG 1 |
| PHY DETECT REG. More... | |
| #define | PHY_DETECT_MASK 0x1808 |
| PHY detect register mask. More... | |
| #define | PHY_R0_RESET 0x8000 |
| PHY control register reset bit. More... | |
| #define | PHY_R0_LOOPBACK 0x4000 |
| PHY control register loopback bit. More... | |
| #define | PHY_R0_DFT_SPD_1000 0x0040 |
| PHY default speed bit for 1000 Mbps. More... | |
| #define | ETH_SYSTEM_ADDRESS_EUI48_HIGH 0x000A35 |
| Upper bytes of the Ethernet EUI-48 address. More... | |
| #define | ETH_SYSTEM_ADDRESS_EUI48_LOW 0x010203 |
| Lower bytes of the Ethernet EUI-48 address. More... | |
| #define | XAXIETHERNET_EXAMPLE_H |
| XAXIETHERNET EXAMPLE H. More... | |
| #define | AXIETHERNET_LOOPBACK_SPEED 100 |
| 100Mb/s for Mii. More... | |
| #define | AXIETHERNET_LOOPBACK_SPEED_1G 1000 |
| 1000Mb/s for GMii. More... | |
| #define | AXIETHERNET_LOOPBACK_SPEED_2p5G 2500 |
| 2p5G for 2.5G MAC. More... | |
| #define | AXIETHERNET_PHY_DELAY_SEC 4 |
| Amount of time to delay waiting on PHY to reset. More... | |
| #define | MAX_MULTICAST_ADDR (1<<23) |
| Maximum number of multicast Ethernet MAC addresses. More... | |
| #define | NUM_PACKETS 50 |
| Number of packets to send in the example. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | AXIETHERNET_DEVICE_ID XPAR_AXIETHERNET_0_DEVICE_ID |
| AXI Ethernet device ID. More... | |
| #define | AXIDMA_DEVICE_ID XPAR_AXIDMA_0_DEVICE_ID |
| AXI DMA device ID. More... | |
| #define | RXBD_CNT 128 |
| Number of RxBDs to use. More... | |
| #define | TXBD_CNT 128 |
| Number of TxBDs to use. More... | |
| #define | BD_ALIGNMENT XAXIDMA_BD_MINIMUM_ALIGNMENT |
| Byte alignment of BDs. More... | |
| #define | PAYLOAD_SIZE 1000 |
| Payload size used in examples. More... | |
| #define | BD_RX_STATUS_OFFSET 2 |
| BD RX STATUS OFFSET. More... | |
| #define | RXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, RXBD_CNT) |
| RXBD SPACE BYTES. More... | |
| #define | TXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, TXBD_CNT) |
| TXBD SPACE BYTES. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | RXBD_CNT 128 |
| Number of RxBDs to use. More... | |
| #define | TXBD_CNT 128 |
| Number of TxBDs to use. More... | |
| #define | BD_ALIGNMENT XAXIDMA_BD_MINIMUM_ALIGNMENT |
| Byte alignment of BDs. More... | |
| #define | PAYLOAD_SIZE 1000 |
| Payload size used in examples. More... | |
| #define | BD_VLAN_TPID_OFFSET 3 |
| AXI4-Stream status Word offset from the start of app user words in BD. More... | |
| #define | BD_VLAN_VID_OFFSET 4 |
| AXI4-Stream status word offset from the start of app user words in BD. More... | |
| #define | TPID_MASK 0xFFFF0000 |
| Mask to extract TPID from the AXI4 STream status word. More... | |
| #define | RXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, RXBD_CNT) |
| RXBD SPACE BYTES. More... | |
| #define | TXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, TXBD_CNT) |
| TXBD SPACE BYTES. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | PAYLOAD_SIZE 100 |
| Payload size used in examples. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | RXBD_CNT 1024 |
| Number of RxBDs to use. More... | |
| #define | TXBD_CNT 1024 |
| Number of TxBDs to use. More... | |
| #define | BD_ALIGNMENT 64 |
| Byte alignment of BDs. More... | |
| #define | PAYLOAD_SIZE 1000 |
| Payload size used in examples. More... | |
| #define | BD_USR0_OFFSET 0 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | BD_USR1_OFFSET 1 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | BD_USR2_OFFSET 2 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | PARTIAL_CSUM_ENABLE 0x00000001 |
| Option for partial csum enable. More... | |
| #define | FULL_CSUM_ENABLE 0x00000002 |
| Option for full csum enable. More... | |
| #define | TX_CS_INIT_OFFSET 16 |
| Offset in the control word where byte offset in the ethernet frame to start CSUM calculation need to be inserted. More... | |
| #define | RCV_FRM_NOT_CORRUPTED 0xFFFF |
| If the received frame is not corrupted, for partial csum offloading case, the control word 3 would return 0xFFFF. More... | |
| #define | IP_VERSION_4 0x800 |
| For IPV4, the Ethernet frame type/length field will have a value of 0x800. More... | |
| #define | IP_HEADER_VERSION 0x04 |
| For IPv4, the version entry in IP header is always 4. More... | |
| #define | IP_HEADER_LEN_IN_WORDS 0x05 |
| For our case, the header length is always 20 bytes (5 words. More... | |
| #define | IP_HEADER_LENGTH 20 |
| IP header length in bytes. More... | |
| #define | IP_HEADER_PROTOCOL_TCP 0x6 |
| IP header protocol entry. More... | |
| #define | IP_HEADER_PROTOCOL_UDP 0x17 |
| IP header protocol entry. More... | |
| #define | TCP_HEADER_LEN_IN_WORDS 0x5 |
| For our case, the header length is always 20 bytes (5 words). More... | |
| #define | TCP_HEADER_LENGTH 20 |
| IP header length in bytes. More... | |
| #define | FULL_CSUM_STATUS_MASK 0x00000038 |
| Mask to extract full checksum status field from AXI4 Stream Status Word 2. More... | |
| #define | FULL_CSUM_VALIDATED 0x00000002 |
| If bits 3-5 in AXI4 Status word have a value of 0x010, it means both IP and TCP checksums have been found to be correct. More... | |
| #define | IP_TCP_CSUMS_NOT_CHECKED 0x00000000 |
| IP TCP CSUMS NOT CHECKED. More... | |
| #define | IP_CSUM_OK_TCP_NOT_CHECKED 0x00000001 |
| IP CSUM OK TCP NOT CHECKED. More... | |
| #define | TCP_CSUM_NOT_CHECKED_IP_NOT_OK 0x00000005 |
| TCP CSUM NOT CHECKED IP NOT OK. More... | |
| #define | IP_CSUM_OK_TCP_NOT_OK 0x00000006 |
| IP CSUM OK TCP NOT OK. More... | |
| #define | DUMMY_TCP_PORT_1 0x1111 |
| DUMMY TCP PORT 1. More... | |
| #define | DUMMY_TCP_PORT_2 0x1112 |
| DUMMY TCP PORT 2. More... | |
| #define | RXBD_SPACE_BYTES RXBD_CNT * 64 * 16 |
| RXBD SPACE BYTES. More... | |
| #define | TXBD_SPACE_BYTES TXBD_CNT * 64 * 16 |
| TXBD SPACE BYTES. More... | |
| #define | BLOCK_SIZE_2MB 0x200000U |
| BLOCK SIZE 2MB. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | RXBD_CNT 128 |
| Number of RxBDs to use. More... | |
| #define | TXBD_CNT 128 |
| Number of TxBDs to use. More... | |
| #define | BD_ALIGNMENT XAXIDMA_BD_MINIMUM_ALIGNMENT*2 |
| Byte alignment required for buffer descriptors. More... | |
| #define | PAYLOAD_SIZE 1000 |
| Payload size used in examples. More... | |
| #define | BD_USR0_OFFSET 0 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | BD_USR1_OFFSET 1 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | BD_USR2_OFFSET 2 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | PARTIAL_CSUM_ENABLE 0x00000001 |
| Option for partial csum enable. More... | |
| #define | FULL_CSUM_ENABLE 0x00000002 |
| Option for full csum enable. More... | |
| #define | TX_CS_INIT_OFFSET 16 |
| Offset in the control word where byte offset in the ethernet frame to start CSUM calculation need to be inserted. More... | |
| #define | RCV_FRM_NOT_CORRUPTED 0xFFFF |
| If the received frame is not corrupted, for partial csum offloading case, the control word 3 would return 0xFFFF. More... | |
| #define | IP_VERSION_4 0x800 |
| For IPV4, the Ethernet frame type/length field will have a value of 0x800. More... | |
| #define | IP_HEADER_VERSION 0x04 |
| For IPv4, the version entry in IP header is always 4. More... | |
| #define | IP_HEADER_LEN_IN_WORDS 0x05 |
| For our case, the header length is always 20 bytes (5 words. More... | |
| #define | IP_HEADER_LENGTH 20 |
| IP header length in bytes. More... | |
| #define | IP_HEADER_PROTOCOL_TCP 0x6 |
| IP header protocol entry. More... | |
| #define | IP_HEADER_PROTOCOL_UDP 0x17 |
| IP header protocol entry. More... | |
| #define | TCP_HEADER_LEN_IN_WORDS 0x5 |
| For our case, the header length is always 20 bytes (5 words). More... | |
| #define | TCP_HEADER_LENGTH 20 |
| IP header length in bytes. More... | |
| #define | FULL_CSUM_STATUS_MASK 0x00000038 |
| Mask to extract full checksum status field from AXI4 Stream Status Word 2. More... | |
| #define | FULL_CSUM_VALIDATED 0x00000002 |
| If bits 3-5 in AXI4 Status word have a value of 0x010, it means both IP and TCP checksums have been found to be correct. More... | |
| #define | IP_TCP_CSUMS_NOT_CHECKED 0x00000000 |
| IP TCP CSUMS NOT CHECKED. More... | |
| #define | IP_CSUM_OK_TCP_NOT_CHECKED 0x00000001 |
| IP CSUM OK TCP NOT CHECKED. More... | |
| #define | TCP_CSUM_NOT_CHECKED_IP_NOT_OK 0x00000005 |
| TCP CSUM NOT CHECKED IP NOT OK. More... | |
| #define | IP_CSUM_OK_TCP_NOT_OK 0x00000006 |
| IP CSUM OK TCP NOT OK. More... | |
| #define | DUMMY_TCP_PORT_1 0x1111 |
| DUMMY TCP PORT 1. More... | |
| #define | DUMMY_TCP_PORT_2 0x1112 |
| DUMMY TCP PORT 2. More... | |
| #define | RXBD_SPACE_BYTES (XAxiDma_BdRingMemCalc(BD_ALIGNMENT, RXBD_CNT)) |
| RXBD SPACE BYTES. More... | |
| #define | TXBD_SPACE_BYTES (XAxiDma_BdRingMemCalc(BD_ALIGNMENT, TXBD_CNT)) |
| TXBD SPACE BYTES. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | RXBD_CNT 1024 |
| Number of RxBDs to use. More... | |
| #define | TXBD_CNT 1024 |
| Number of TxBDs to use. More... | |
| #define | BD_ALIGNMENT 64 |
| Byte alignment of BDs. More... | |
| #define | PAYLOAD_SIZE 1000 |
| Payload size used in examples. More... | |
| #define | BD_USR0_OFFSET 0 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | BD_USR1_OFFSET 1 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | BD_USR2_OFFSET 2 |
| AXI4-Stream Control Word offset from the start of app user words in BD. More... | |
| #define | PARTIAL_CSUM_ENABLE 0x00000001 |
| Option for partial csum enable. More... | |
| #define | FULL_CSUM_ENABLE 0x00000002 |
| Option for full csum enable. More... | |
| #define | TX_CS_INIT_OFFSET 16 |
| Offset in the control word where byte offset in the ethernet frame to start CSUM calculation need to be inserted. More... | |
| #define | RCV_FRM_NOT_CORRUPTED 0xFFFF |
| If the received frame is not corrupted, for partial csum offloading case, the control word 3 would return 0xFFFF. More... | |
| #define | IP_VERSION_4 0x800 |
| For IPV4, the Ethernet frame type/length field will have a value of 0x800. More... | |
| #define | IP_HEADER_VERSION 0x04 |
| For IPv4, the version entry in IP header is always 4. More... | |
| #define | IP_HEADER_LEN_IN_WORDS 0x05 |
| For our case, the header length is always 20 bytes (5 words. More... | |
| #define | IP_HEADER_LENGTH 20 |
| IP header length in bytes. More... | |
| #define | IP_HEADER_PROTOCOL_TCP 0x6 |
| IP header protocol entry. More... | |
| #define | IP_HEADER_PROTOCOL_UDP 0x17 |
| IP header protocol entry. More... | |
| #define | TCP_HEADER_LEN_IN_WORDS 0x5 |
| For our case, the header length is always 20 bytes (5 words). More... | |
| #define | TCP_HEADER_LENGTH 20 |
| IP header length in bytes. More... | |
| #define | FULL_CSUM_STATUS_MASK 0x00000038 |
| Mask to extract full checksum status field from AXI4 Stream Status Word 2. More... | |
| #define | FULL_CSUM_VALIDATED 0x00000002 |
| If bits 3-5 in AXI4 Status word have a value of 0x010, it means both IP and TCP checksums have been found to be correct. More... | |
| #define | IP_TCP_CSUMS_NOT_CHECKED 0x00000000 |
| IP TCP CSUMS NOT CHECKED. More... | |
| #define | IP_CSUM_OK_TCP_NOT_CHECKED 0x00000001 |
| IP CSUM OK TCP NOT CHECKED. More... | |
| #define | TCP_CSUM_NOT_CHECKED_IP_NOT_OK 0x00000005 |
| TCP CSUM NOT CHECKED IP NOT OK. More... | |
| #define | IP_CSUM_OK_TCP_NOT_OK 0x00000006 |
| IP CSUM OK TCP NOT OK. More... | |
| #define | DUMMY_TCP_PORT_1 0x1111 |
| DUMMY TCP PORT 1. More... | |
| #define | DUMMY_TCP_PORT_2 0x1112 |
| DUMMY TCP PORT 2. More... | |
| #define | RXBD_SPACE_BYTES RXBD_CNT * 64 * 16 |
| RXBD SPACE BYTES. More... | |
| #define | TXBD_SPACE_BYTES TXBD_CNT * 64 * 16 |
| TXBD SPACE BYTES. More... | |
| #define | BLOCK_SIZE_2MB 0x200000U |
| BLOCK SIZE 2MB. More... | |
| #define | AXIETHERNET_DEVICE_ID XPAR_AXIETHERNET_0_DEVICE_ID |
| Device ID for AXI Ethernet. More... | |
| #define | FIFO_DEVICE_ID XPAR_AXI_FIFO_0_DEVICE_ID |
| Device ID for AXI FIFO. More... | |
| #define | PHY_DETECT_REG 1 |
| MII status register used to detect the PHY. More... | |
| #define | PHY_DETECT_MASK 0x1808 |
| PHY detect register feature mask. More... | |
| #define | PHY_R0_DFT_SPD_2500 0x0040 |
| Default PHY speed bits for 2500 Mbps. More... | |
| #define | XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
| AXI Ethernet base address. More... | |
| #define | NUM_OF_PING_REQ_PKTS 10 |
| Number of ping req it generates. More... | |
| #define | RXBD_CNT 1024 |
| Number of RxBDs to use. More... | |
| #define | TXBD_CNT 1024 |
| Number of TxBDs to use. More... | |
| #define | BD_ALIGNMENT 64 |
| Byte alignment of BDs. More... | |
| #define | ECHO_REPLY 0x00 |
| Echo reply. More... | |
| #define | HW_TYPE 0x01 |
| Hardware type (10/100 Mbps). More... | |
| #define | ARP_REQUEST 0x01 |
| ARP Request bits in Rx packet. More... | |
| #define | ARP_REPLY 0x02 |
| ARP status bits indicating reply. More... | |
| #define | IDEN_NUM 0x02 |
| ICMP identifier number. More... | |
| #define | IP_VERSION 0x0604 |
| IP version ipv4/ipv6. More... | |
| #define | BROADCAST_ADDR 0xFFFF |
| Broadcast Address. More... | |
| #define | CORRECT_CHECKSUM_VALUE 0xFFFF |
| Correct checksum value. More... | |
| #define | ARP_REQ_PKT_SIZE 0x2A |
| ARP request packet size. More... | |
| #define | ICMP_PKT_SIZE 0x4A |
| ICMP packet length 74 Bytes including Src and dest MAC Add. More... | |
| #define | IP_ADDR_SIZE 4 |
| IP Address size in Bytes. More... | |
| #define | NUM_RX_PACK_CHECK_REQ 10 |
| Max num of Rx pack to be checked before sending another request. More... | |
| #define | NUM_PACK_CHECK_RX_PACK 8000000 |
| Max number of pack to be checked before to identify a Rx packet. More... | |
| #define | DELAY 1000000 |
| Used to introduce delay. More... | |
| #define | SRC_MAC_ADDR_LOC 3 |
| Src MAC address location. More... | |
| #define | MAC_ADDR_LEN 3 |
| MAC address length. More... | |
| #define | ETHER_PROTO_TYPE_LOC 6 |
| Ethernet Proto type loc. More... | |
| #define | IP_ADDR_LEN 2 |
| Size of IP address. More... | |
| #define | IP_START_LOC 7 |
| IP header start location. More... | |
| #define | IP_HEADER_INFO_LEN 7 |
| IP header information length. More... | |
| #define | IP_HEADER_LEN 10 |
| IP header length. More... | |
| #define | IP_CHECKSUM_LOC 12 |
| IP header checksum location. More... | |
| #define | IP_REQ_SRC_IP_LOC 13 |
| Src IP add loc of ICMP req. More... | |
| #define | IP_REQ_DEST_IP_LOC 15 |
| Dest IP add loc of ICMP req. More... | |
| #define | ICMP_KNOWN_DATA_LEN 16 |
| ICMP known data length. More... | |
| #define | ICMP_ECHO_FIELD_LOC 17 |
| Echo field loc. More... | |
| #define | ICMP_DATA_START_LOC 17 |
| Data field start location. More... | |
| #define | ICMP_DATA_LEN 18 |
| ICMP data length. More... | |
| #define | ICMP_DATA_CHECKSUM_LOC 18 |
| ICMP data checksum location. More... | |
| #define | ICMP_IDEN_FIELD_LOC 19 |
| Identifier field loc. More... | |
| #define | ICMP_DATA_LOC 19 |
| ICMP data loc including identifier number and sequence number. More... | |
| #define | ICMP_SEQ_NO_LOC 20 |
| sequence number location. More... | |
| #define | ICMP_DATA_FIELD_LEN 20 |
| Data field length. More... | |
| #define | ICMP_KNOWN_DATA_LOC 21 |
| ICMP known data start loc. More... | |
| #define | ARP_REQ_STATUS_LOC 10 |
| ARP request loc. More... | |
| #define | ARP_REQ_SRC_IP_LOC 14 |
| Src IP add loc of ARP req Packet. More... | |
| #define | RXBD_SPACE_BYTES RXBD_CNT * 64 * 16 |
| RXBD SPACE BYTES. More... | |
| #define | TXBD_SPACE_BYTES TXBD_CNT * 64 * 16 |
| TXBD SPACE BYTES. More... | |
| #define | XAE_ETHER_PROTO_TYPE_IP 0x0800 |
| IP Protocol. More... | |
| #define | XAE_ETHER_PROTO_TYPE_ARP 0x0806 |
| ARP Protocol. More... | |
| #define | XAE_ETHER_PROTO_TYPE_VLAN 0x8100 |
| VLAN Tagged. More... | |
| #define | XAE_ARP_PACKET_SIZE 28 |
| Max ARP packet size. More... | |
| #define | XAE_HEADER_IP_LENGTH_OFFSET 16 |
| IP Length Offset. More... | |
| #define | XAE_VLAN_TAG_SIZE 4 |
| VLAN Tag Size. More... | |
| #define | PHY_R0_CTRL_REG 0 |
| PHY R0 CTRL REG. More... | |
| #define | PHY_R3_PHY_IDENT_REG 3 |
| PHY identifier register address. More... | |
| #define | PHY_R0_RESET 0x8000 |
| PHY control register reset bit. More... | |
| #define | PHY_R0_LOOPBACK 0x4000 |
| PHY control register loopback bit. More... | |
| #define | PHY_R0_ANEG_ENABLE 0x1000 |
| PHY auto-negotiation enable bit. More... | |
| #define | PHY_R0_DFT_SPD_MASK 0x2040 |
| PHY default speed field mask. More... | |
| #define | PHY_R0_DFT_SPD_10 0x0000 |
| PHY default speed bit for 10 Mbps. More... | |
| #define | PHY_R0_DFT_SPD_100 0x2000 |
| PHY default speed bit for 100 Mbps. More... | |
| #define | PHY_R0_DFT_SPD_1000 0x0040 |
| PHY default speed bit for 1000 Mbps. More... | |
| #define | PHY_R0_ISOLATE 0x0400 |
| PHY R0 ISOLATE. More... | |
| #define | PHY_R20_EXTND_CTRL_REG 20 |
| PHY R20 EXTND CTRL REG. More... | |
| #define | PHY_R27_EXTND_STS_REG 27 |
| PHY R27 EXTND STS REG. More... | |
| #define | PHY_R20_DFT_SPD_10 0x20 |
| PHY R20 DFT SPD 10. More... | |
| #define | PHY_R20_DFT_SPD_100 0x50 |
| PHY R20 DFT SPD 100. More... | |
| #define | PHY_R20_DFT_SPD_1000 0x60 |
| PHY R20 DFT SPD 1000. More... | |
| #define | PHY_R20_RX_DLY 0x80 |
| PHY R20 RX DLY. More... | |
| #define | PHY_R27_MAC_CONFIG_GMII 0x000F |
| PHY R27 MAC CONFIG GMII. More... | |
| #define | PHY_R27_MAC_CONFIG_MII 0x000F |
| PHY R27 MAC CONFIG MII. More... | |
| #define | PHY_R27_MAC_CONFIG_RGMII 0x000B |
| PHY R27 MAC CONFIG RGMII. More... | |
| #define | PHY_R27_MAC_CONFIG_SGMII 0x0004 |
| PHY R27 MAC CONFIG SGMII. More... | |
| #define | PHY_R22_PAGE_ADDR_REG 22 |
| PHY R22 PAGE ADDR REG. More... | |
| #define | PHY_PG2_R21_CTRL_REG 21 |
| PHY PG2 R21 CTRL REG. More... | |
| #define | PHY_REG21_10 0x0030 |
| PHY REG21 10. More... | |
| #define | PHY_REG21_100 0x2030 |
| PHY REG21 100. More... | |
| #define | PHY_REG21_1000 0x0070 |
| PHY REG21 1000. More... | |
| #define | MARVEL_PHY_88E1111_MODEL 0xC0 |
| MARVEL PHY 88E1111 MODEL. More... | |
| #define | MARVEL_PHY_88E1116R_MODEL 0x240 |
| MARVEL PHY 88E1116R MODEL. More... | |
| #define | PHY_MODEL_NUM_MASK 0x3F0 |
| PHY MODEL NUM MASK. More... | |
| #define | TI_PHY_IDENTIFIER 0x2000 |
| TI PHY IDENTIFIER. More... | |
| #define | TI_PHY_MODEL 0x230 |
| TI PHY MODEL. More... | |
| #define | TI_PHY_CR 0xD |
| TI PHY CR. More... | |
| #define | TI_PHY_PHYCTRL 0x10 |
| TI PHY PHYCTRL. More... | |
| #define | TI_PHY_CR_SGMII_EN 0x0800 |
| TI PHY CR SGMII EN. More... | |
| #define | TI_PHY_ADDDR 0xE |
| TI PHY ADDDR. More... | |
| #define | TI_PHY_CFGR2 0x14 |
| TI PHY CFGR2. More... | |
| #define | TI_PHY_SGMIITYPE 0xD3 |
| TI PHY SGMIITYPE. More... | |
| #define | TI_PHY_CFGR2_SGMII_AUTONEG_EN 0x0080 |
| TI PHY CFGR2 SGMII AUTONEG EN. More... | |
| #define | TI_PHY_SGMIICLK_EN 0x4000 |
| TI PHY SGMIICLK EN. More... | |
| #define | TI_PHY_CR_DEVAD_EN 0x001F |
| TI PHY CR DEVAD EN. More... | |
| #define | TI_PHY_CR_DEVAD_DATAEN 0x4000 |
| TI PHY CR DEVAD DATAEN. More... | |
Typedefs | |
| typedef struct XAxiEthernet_Config | XAxiEthernet_Config |
| Holds configuration information for an AXI Ethernet device. More... | |
| typedef struct XAxiEthernet | XAxiEthernet |
| struct XAxiEthernet is the type for Axi Ethernet driver instance data. More... | |
Functions | |
| int | XAxiEthernet_CfgInitialize (XAxiEthernet *InstancePtr, XAxiEthernet_Config *CfgPtr, UINTPTR EffectiveAddress) |
| XAxiEthernet_CfgInitialize initializes an AXI Ethernet device along with the. More... | |
| int | XAxiEthernet_Initialize (XAxiEthernet *InstancePtr, XAxiEthernet_Config *CfgPtr, UINTPTR EffectiveAddress) |
| XAxiEthernet_Initialize initializes an AXI Ethernet device along with the. More... | |
| void | XAxiEthernet_Start (XAxiEthernet *InstancePtr) |
| XAxiEthernet_Start starts the Axi Ethernet device as follows:. More... | |
| void | XAxiEthernet_Stop (XAxiEthernet *InstancePtr) |
| XAxiEthernet_Stop gracefully stops the Axi Ethernet device as follows:. More... | |
| void | XAxiEthernet_Reset (XAxiEthernet *InstancePtr) |
| XAxiEthernet_Reset does not perform a soft reset of the AxiEthernet core. More... | |
| int | XAxiEthernet_SetMacAddress (XAxiEthernet *InstancePtr, void *AddressPtr) |
| Sets the MAC address for the AXI Ethernet device. More... | |
| void | XAxiEthernet_GetMacAddress (XAxiEthernet *InstancePtr, void *AddressPtr) |
| Reads the MAC address for the AXI Ethernet device. More... | |
| int | XAxiEthernet_SetOptions (XAxiEthernet *InstancePtr, u32 Options) |
| XAxiEthernet_SetOptions enables the options, Options for the. More... | |
| int | XAxiEthernet_ClearOptions (XAxiEthernet *InstancePtr, u32 Options) |
| XAxiEthernet_ClearOptions clears the options, Options for the. More... | |
| u32 | XAxiEthernet_GetOptions (XAxiEthernet *InstancePtr) |
| XAxiEthernet_GetOptions returns the current option settings. More... | |
| u16 | XAxiEthernet_GetOperatingSpeed (XAxiEthernet *InstancePtr) |
| Reads the current operating link speed. More... | |
| int | XAxiEthernet_SetOperatingSpeed (XAxiEthernet *InstancePtr, u16 Speed) |
| Sets the current operating link speed. More... | |
| void | XAxiEthernet_SetBadFrmRcvOption (XAxiEthernet *InstancePtr) |
| Enables the bad frame receive option. More... | |
| void | XAxiEthernet_ClearBadFrmRcvOption (XAxiEthernet *InstancePtr) |
| Disables the bad frame receive option. More... | |
| void | XAxiEthernet_DisableControlFrameLenCheck (XAxiEthernet *InstancePtr) |
| Disables the length check for control frames. More... | |
| void | XAxiEthernet_EnableControlFrameLenCheck (XAxiEthernet *InstancePtr) |
| Enables the length check for control frames. More... | |
| void | XAxiEthernet_PhySetMdioDivisor (XAxiEthernet *InstancePtr, u8 Divisor) |
| XAxiEthernet_PhySetMdioDivisor sets the MDIO clock divisor in the. More... | |
| void | XAxiEthernet_PhyRead (XAxiEthernet *InstancePtr, u32 PhyAddress, u32 RegisterNum, u16 *PhyDataPtr) |
| XAxiEthernet_PhyRead reads the specified PHY register, RegiseterNum. More... | |
| void | XAxiEthernet_PhyWrite (XAxiEthernet *InstancePtr, u32 PhyAddress, u32 RegisterNum, u16 PhyData) |
| XAxiEthernet_PhyWrite writes PhyData to the specified PHY register, RegiseterNum on the PHY specified by PhyAddress. More... | |
| XAxiEthernet_Config * | XAxiEthernet_LookupConfig (UINTPTR BaseAddress) |
| Looks up device configuration by base address. More... | |
| int | XAxiEthernet_SetMacPauseAddress (XAxiEthernet *InstancePtr, void *AddressPtr) |
| XAxiEthernet_SetMacPauseAddress sets the MAC address used for pause frames. More... | |
| void | XAxiEthernet_GetMacPauseAddress (XAxiEthernet *InstancePtr, void *AddressPtr) |
| XAxiEthernet_GetMacPauseAddress gets the MAC address used for pause frames. More... | |
| int | XAxiEthernet_SendPausePacket (XAxiEthernet *InstancePtr, u16 PauseValue) |
| XAxiEthernet_SendPausePacket sends a pause packet with the value of. More... | |
| int | XAxiEthernet_GetSgmiiStatus (XAxiEthernet *InstancePtr, u16 *SpeedPtr) |
| XAxiEthernet_GetSgmiiStatus get the state of the link when using the SGMII. More... | |
| int | XAxiEthernet_GetRgmiiStatus (XAxiEthernet *InstancePtr, u16 *SpeedPtr, int *IsFullDuplexPtr, int *IsLinkUpPtr) |
| XAxiEthernet_GetRgmiiStatus get the state of the link when using the RGMII. More... | |
| int | XAxiEthernet_MulticastAdd (XAxiEthernet *InstancePtr, void *AddressPtr, int Entry) |
| XAxiEthernet_MulticastAdd adds the Ethernet address, AddressPtr to the. More... | |
| void | XAxiEthernet_MulticastGet (XAxiEthernet *InstancePtr, void *AddressPtr, int Entry) |
| XAxiEthernet_MulticastGet gets the Ethernet address stored at. More... | |
| int | XAxiEthernet_MulticastClear (XAxiEthernet *InstancePtr, int Entry) |
| XAxiEthernet_MulticastClear clears the Ethernet address stored at index. More... | |
| int | XAxiEthernet_SetTpid (XAxiEthernet *InstancePtr, u16 Tpid, u8 Entry) |
| XAxiEthernet_SetTpid sets the VLAN Tag Protocol Identifier(TPID). More... | |
| int | XAxiEthernet_ClearTpid (XAxiEthernet *InstancePtr, u8 Entry) |
| XAxiEthernet_ClearTpid clears the VLAN Tag Protocol Identifier(TPID). More... | |
| void | XAxiEthernet_GetTpid (XAxiEthernet *InstancePtr, u16 *TpidPtr, u8 Entry) |
| XAxiEthernet_GetTpid gets the VLAN Tag Protocol Identifier value (TPID). More... | |
| int | XAxiEthernet_SetVTagMode (XAxiEthernet *InstancePtr, u32 Mode, int Dir) |
| XAxiEthernet_SetVTagMode configures the VLAN tagging mode. More... | |
| void | XAxiEthernet_GetVTagMode (XAxiEthernet *InstancePtr, u8 *ModePtr, int Dir) |
| XAxiEthernet_GetVTagMode gets VLAN tagging mode. More... | |
| int | XAxiEthernet_SetVStripMode (XAxiEthernet *InstancePtr, u32 Mode, int Dir) |
| XAxiEthernet_SetVStripMode configures the VLAN strip mode. More... | |
| void | XAxiEthernet_GetVStripMode (XAxiEthernet *InstancePtr, u8 *ModePtr, int Dir) |
| XAxiEthernet_GetVStripMode gets the VLAN stripping mode. More... | |
| int | XAxiEthernet_SetVTagValue (XAxiEthernet *InstancePtr, u32 VTagValue, int Dir) |
| XAxiEthernet_SetVTagValue configures the VLAN tagging value. More... | |
| void | XAxiEthernet_GetVTagValue (XAxiEthernet *InstancePtr, u32 *VTagValuePtr, int Dir) |
| XAxiEthernet_GetVTagValue gets the configured VLAN tagging value. More... | |
| int | XAxiEthernet_SetVidTable (XAxiEthernet *InstancePtr, u32 Entry, u32 Vid, u8 Strip, u8 Tag, int Dir) |
| XAxiEthernet_SetVidTable sets VID table includes new VLAN ID, strip. More... | |
| void | XAxiEthernet_GetVidTable (XAxiEthernet *InstancePtr, u32 Entry, u32 *VidPtr, u8 *StripPtr, u8 *TagPtr, int Dir) |
| XAxiEthernet_GetVidTable gets VID table content includes new VLAN ID, strip. More... | |
| int | XAxiEthernet_AddExtMulticastGroup (XAxiEthernet *InstancePtr, void *AddressPtr) |
| XAxiEthernet_AddExtMulticastGroup adds an entry to the multicast Ethernet. More... | |
| int | XAxiEthernet_ClearExtMulticastGroup (XAxiEthernet *InstancePtr, void *AddressPtr) |
| XAxiEthernet_ClearExtMulticastGroup clears input multicast Ethernet address. More... | |
| int | XAxiEthernet_GetExtMulticastGroup (XAxiEthernet *InstancePtr, void *AddressPtr) |
| XAxiEthernet_GetExtMulticastGroup returns whether the given Ethernet address. More... | |
| void | XAxiEthernet_DumpExtMulticastGroup (XAxiEthernet *InstancePtr) |
| XAxiEthernet_DumpExtMulticastGroup dumps ALL provisioned acceptable multicast. More... | |
| XStatus | XAvb_CfgInitialize (XAvb *InstancePtr, XAvb_Config *ConfigPtr, u32 EffectiveAddress) |
| A function to initialise variables in the data structure records. More... | |
| void | XAvb_Reset (XAvb *InstancePtr) |
| Resets all of the AVB device driver functions to the start-up. More... | |
| void | XAvb_Start (XAvb *InstancePtr) |
| start the PTP drivers running. More... | |
| void | XAvb_Stop (XAvb *InstancePtr) |
| stop the PTP drivers from running. More... | |
| void | XAvb_PtpTimerInterruptHandler (XAvb *InstancePtr) |
| The Interrupt subroutine for the "interruptPtpTimer" signal. More... | |
| void | XAvb_PtpRxInterruptHandler (XAvb *InstancePtr) |
| The Interrupt subroutine for the "interrupt_ptp_rx" signal. More... | |
| void | XAvb_SetupRxFilterControlPcp (XAvb *InstancePtr, u32 VlanPriority, u8 SrClass) |
| A function to set the VLAN PCP field for either SR A or B traffic in the. More... | |
| void | XAvb_SetupRxFilterControlVid (XAvb *InstancePtr, u32 VlanVid, u8 SrClass) |
| A function to set the VLAN VID field for either SR A or B traffic in the. More... | |
| void | XAvb_SetupRxFilterControlMatchMode (XAvb *InstancePtr, u32 VlanMatchMode) |
| A function to set the VLAN Match Mode field for the RX Filtering Control. More... | |
| void | AvbGMDiscontinuityHandler (void *CallBackRef, u32 TimestampsUncertain) |
| is the handler which will be called if the PTP drivers. More... | |
| int | main () |
| Main entry point for the AVB example. More... | |
| void | XAvbMac_ReadStats (u32 BaseAddress, u32 CounterId, XAvb_Uint64 *Value) |
| Reads the given Ethernet Statistic Register. More... | |
| void | XAvb_ReadRtc (u32 BaseAddress, XAvb_RtcFormat *RtcValue) |
| Reads the current Real Time Counter (RTC) value. More... | |
| void | XAvb_WriteRtcOffset (u32 BaseAddress, XAvb_RtcFormat *RtcValue) |
| Writes to the Real Time Counter (RTC) Offset Registers. More... | |
| void | XAvb_DecodeTxAnnounceFrame (XAvb *InstancePtr) |
| A New Announce Packet has been written to this device to transmit. More... | |
| void | XAvb_DecodeRxAnnounceFrame (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A New Announce Packet has been received. More... | |
| void | XAvb_ReadAnnounceFrame (u32 BaseAddress, u32 PtpFrameBaseAddr, XAvb_BmcData *AnnounceFrame) |
| Analyzes a new Announce packet. More... | |
| void | XAvb_ReadAnnounceReceiptTimeout (u32 BaseAddress, u32 PtpFrameBaseAddr, XAvb_BmcData *AnnounceFrame) |
| Reads the logMessageinteval from an RX PTP Buffer and updates. More... | |
| u32 | XAvb_BestMasterClockAlgorithm (XAvb_BmcData *AnnounceFrame, XAvb_BmcData *CurrentBmc) |
| accept the data pointer to the current BMCA records, accept. More... | |
| void | XAvb_UpdateBmcRecords (XAvb_BmcData *NewMaster, XAvb_BmcData *CurrentBmc) |
| accept the data pointer to the current BMCA records, accept. More... | |
| void | XAvb_BecomeRtcMaster (XAvb *InstancePtr, u8 txAnnounceHasWon) |
| make any adjustments needed when the node becomes the Grand. More... | |
| void | XAvb_BecomeRtcSlave (XAvb *InstancePtr) |
| make any adjustments needed when the node becomes a PTP slave. More... | |
| void | XAvb_ChangePTPLockStatus (XAvb *InstancePtr, u8 locked) |
| Operations needed when PTP locks or unlocks. More... | |
| void | XAvb_ChangePeerASCapability (XAvb *InstancePtr, u8 capable) |
| Operations needed when the peer's AS capability changes. More... | |
| void | XAvb_SetGMDiscontinuityHandler (XAvb *InstancePtr, XAvb_Handler FuncPtr, void *CallBackRef) |
| Sets the handler that will be called when a GM discontinuity. More... | |
| u32 | XAvb_CompareClockIdentity (u32 BaseAddress, XAvb_ClockIdentity Identity1, XAvb_ClockIdentity Identity2) |
| A function to compare two ClockIdentity values. More... | |
| u32 | XAvb_ComparePortIdentity (u32 BaseAddress, XAvb_PortIdentity Identity1, XAvb_PortIdentity Identity2) |
| A function to compare two PortIdentity values. More... | |
| void | XAvb_GetPortIdentity (u32 BaseAddress, u32 PtpFrameBaseAddr, u32 PortIdOffset, XAvb_PortIdentity *portID) |
| A function to extract portIdentity information from a received PTP frame. More... | |
| void | XAvb_WriteToMultipleTxPtpFrames (u32 BaseAddress, u32 PtpFieldAddress, u32 Data, u32 DataBitEnable, u8 BufferEnable) |
| A function to write common data (eg the Source Address) to all PTP frames. More... | |
| u32 | XAvb_ReorderWord (u32 Data) |
| Switches the bytes in a 4-byte word, swapping the MSB for the. More... | |
| u32 | XAvb_IncSequenceId (u32 BaseAddress, u32 PtpFrameBaseAddress) |
| A function to increment the sequenceId in a PTP frame template. More... | |
| void | XAvb_WaitOnTxPtpQueue (XAvb *InstancePtr) |
| The software drivers are kept simple by only requesting a single PTP frame to. More... | |
| void | XAvb_MasterSendAnnounce (XAvb *InstancePtr) |
| A function to format then request the transmission of a PTP Announce Packet. More... | |
| void | XAvb_MasterSendSync (XAvb *InstancePtr) |
| A function to format then request the transmission of a PTP Sync Packet. More... | |
| void | XAvb_MasterSendFollowUp (XAvb *InstancePtr) |
| A function to format then request the transmission of a PTP Follow-Up Packet. More... | |
| void | XAvb_SendPDelayReq (XAvb *InstancePtr) |
| A function to format then request the transmission of a PTP PDelay Request. More... | |
| void | XAvb_SendPDelayResp (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to format then request the transmission of a PTP PDelay Response. More... | |
| void | XAvb_SendPDelayRespFollowUp (XAvb *InstancePtr) |
| A function to format then request the transmission of a PTP PDelay Response. More... | |
| u32 | XAvb_IsRxFramePTP (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to check that various fields in the received frame contain the. More... | |
| void | XAvb_DecodeRxSync (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to decode a received PTP Sync Packet. More... | |
| void | XAvb_DecodeRxFollowUp (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to decode a received PTP Follow-up Packet. More... | |
| void | XAvb_DecodeRxPDelayResp (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to decode a received PDelayResp Packet. More... | |
| void | XAvb_DecodeRxPDelayRespFollowUp (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to decode a received PDelayRespFollowUp Packet. More... | |
| void | XAvb_DecodeRxSignaling (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| A function to decode a received Signalling Packet and modify the TX PTP. More... | |
| u16 | XAvb_UpdateIntervalDuration (u16 currentIntervalDuration, char logMeanVal) |
| A function to update a PTP message Interval Duration (defined as a. More... | |
| u16 | XAvb_ConvertLogMeanToDuration (char logMeanVal) |
| A function to convert a logMean (power of 2) value into a fraction of 128. More... | |
| char | XAvb_ConvertDurationToLogMean (u16 fractionalVal) |
| A function to convert a fraction of 128 value that is compatible with. More... | |
| void | XAvb_UpdateLogMeanMessageInterval (u32 BaseAddress, u32 PtpFrameBaseAddr, u16 intervalDuration) |
| A function to update the logMeanMessageInterval field in a PTP packet. More... | |
| void | XAvb_SetupSourcePortIdentity (XAvb *InstancePtr, XAvb_PortIdentity systemIdentity) |
| Updates the portIdLocal local copy of the sourcePortIdentity. More... | |
| u32 | XAvb_CaptureNanoSec (u32 BaseAddress, u32 PtpFrameBaseAddr) |
| Captures the nanosecond timestamp field from a received PTP frame. More... | |
| void | XAvb_CalcDelay (XAvb *InstancePtr) |
| Measures the link delay of the local full-duplex Ethernet link. More... | |
| void | XAvb_CalcRtcOffset (XAvb *InstancePtr, u32 PtpFrameBaseAddr) |
| Calculates the slave RTC offset from the grandmaster time. More... | |
| void | XAvb_Adjust8kClock (u32 BaseAddress, u32 NewOffset) |
| Adjusts the phase offset of the 8 kHz clock. More... | |
| void | XAvb_UpdateRtcIncrement (XAvb *InstancePtr) |
| Calculates the RTC increment value based on the slave error. More... | |
| void | AxiEthernetUtilSetupUart (void) |
| Configures the UART used by the example. More... | |
| void | AxiEthernetUtilFrameHdrFormatMAC (EthernetFrame *FramePtr, char *DestAddr) |
| Formats an Ethernet frame header with the destination MAC address. More... | |
| void | AxiEthernetUtilFrameHdrFormatType (EthernetFrame *FramePtr, u16 FrameType) |
| Formats an Ethernet frame header with the EtherType value. More... | |
| void | AxiEthernetUtilFrameSetPayloadData (EthernetFrame *FramePtr, int PayloadSize) |
| Fills an Ethernet frame payload with test data. More... | |
| void | AxiEthernetUtilFrameHdrVlanFormatVid (EthernetFrame *FramePtr, u32 VlanNumber, u32 Vid) |
| Formats a VLAN Ethernet frame header with the VLAN ID. More... | |
| void | AxiEthernetUtilFrameHdrVlanFormatType (EthernetFrame *FramePtr, u16 FrameType, u32 VlanNumber) |
| Formats a VLAN Ethernet frame header with the EtherType value. More... | |
| void | AxiEthernetUtilFrameSetVlanPayloadData (EthernetFrame *FramePtr, int PayloadSize, u32 VlanNumber) |
| Fills a VLAN Ethernet frame payload with test data. More... | |
| int | AxiEthernetUtilFrameVerify (EthernetFrame *CheckFrame, EthernetFrame *ActualFrame) |
| Verifies that two Ethernet frames contain the same data. More... | |
| void | AxiEthernetUtilFrameMemClear (EthernetFrame *FramePtr) |
| Clears an Ethernet frame buffer. More... | |
| int | AxiEthernetUtilEnterLoopback (XAxiEthernet *AxiEthernetInstancePtr, int Speed) |
| Sets the PHY to loopback mode. More... | |
| void | AxiEthernetUtilErrorTrap (char *Message) |
| Called by example code when an error is detected. More... | |
| void | AxiEthernetUtilPhyDelay (unsigned int Seconds) |
| Delays for the specified number of seconds while PHY hardware recovers. More... | |
| int | AxiEthernetUtilConfigureInternalPhy (XAxiEthernet *AxiEthernetInstancePtr, int Speed) |
| Configures the internal phy for SGMII and 1000baseX modes. More... | |
| int | AxiEtherentConfigureTIPhy (XAxiEthernet *AxiEthernetInstancePtr, u32 PhyAddr) |
| Configures a TI PHY for SGMII operation. More... | |
| int | AxiEthernetMcastExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| Demonstrates the usage of the Axi Ethernet extended. More... | |
| int | AxiEthernetSgDmaIntrExtMulticastExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
| This example sends and receives a single packet in loopback mode with. More... | |
| int | AxiEthernetExtVlanExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| Demonstrates the usage of the Axi Ethernet by sending. More... | |
| int | AxiEthernetSgDmaIntrExtVlanExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
| This example sends and receives a single packet in loopback mode with. More... | |
| int | AxiEthernetFifoIntrExample (XAxiEthernet *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| Demonstrates AXI Ethernet usage by sending and receiving frames in. More... | |
| int | AxiEthernetSingleFrameIntrExample (XAxiEthernet *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetSingleFrameNonContIntrExample (XAxiEthernet *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr) |
| This example sends a packet from non-contiguous memory locations. More... | |
| int | AxiEthernetMultipleFramesIntrExample (XAxiEthernet *AxiEthernetInstancePtr, XLlFifo *FifoInstancePtr) |
| This example sends and receives a batch of frames. More... | |
| int | AxiEthernetSgDmaIntrExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| Demonstrates the usage of the Axi Ethernet by sending. More... | |
| int | AxiEthernetSgDmaIntrSingleFrameExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetSgDmaIntrMultiFrameExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetSgDmaPartialChecksumOffloadExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| This example sends and receives a single packet in loopback mode with. More... | |
| int | AxiEthernetSgDmaFullChecksumOffloadExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| This example sends and receives a single packet in loopback mode with. More... | |
| void | AxiEthernetPHYRegistersDump (XAxiEthernet *AxiEthernetInstancePtr) |
| Prints PHY register values for debugging. More... | |
| u16 | Swap8 (u8 Data) |
| Swaps bytes within an 8-byte value. More... | |
| void | AxiEnthernetSetMAC (char *MacAddr, u8 ChanId) |
| Programs the AXI Ethernet MAC address. More... | |
| int | AxiEthernetSgDmaIntrExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| Demonstrates the usage of the Axi Ethernet by sending. More... | |
| int | AxiEthernetSgDmaIntrSingleFrameExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetSgDmaIntrCoalescingExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
| This example sends frames with the interrupt coalescing settings altered. More... | |
| int | AxiEthernetSgDmaPartialChecksumOffloadExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
| This example sends and receives a single packet in loopback mode with. More... | |
| int | AxiEthernetSgDmaFullChecksumOffloadExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
| This example sends and receives a single packet in loopback mode with. More... | |
| int | AxiEthernetSgDmaPollExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| Demonstrates the usage of the Axi Ethernet by sending. More... | |
| int | AxiEthernetSgDmaSingleFrameExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetSgDmaMultiFrameExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | CheckTxDmaResult (XMcdma *InstancePtr) |
| Checks the transmit DMA completion result. More... | |
| int | CheckDmaResult (XMcdma *InstancePtr) |
| Checks the receive DMA completion result. More... | |
| int | AxiEthernetPolledExample (u16 AxiEthernetDeviceId, u16 FifoDeviceId) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetSingleFramePolledExample (void) |
| Demonstrates the usage of the Axi Ethernet by sending and. More... | |
| int | AxiEthernetMultipleFramesPolledExample (void) |
| This example uses polled mode to queue up multiple frames in the packet. More... | |
| int | AxiEthernetPollForTxStatus (void) |
| Polls the Tx status and waits for an indication that a frame has been transmitted successfully or a transmit related error has occurred. More... | |
| int | AxiEthernetPollForRxStatus (void) |
| Polls the Rx status and waits for an indication that a frame has arrived or a receive related error has occurred. More... | |
| int | AxiEthernetResetDevice (void) |
| Resets the device but preserves the options set by the user. More... | |
| u32 | AxiEthernetDetectPHY (XAxiEthernet *AxiEthernetInstancePtr) |
| Detects the PHY address from MII status register contents. More... | |
| int | AxiEthernetPingReqExample (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, UINTPTR AxiEthernetBaseAddress) |
| The entry point for the AxiEthernet driver to ping request example in polled. More... | |
| void | SendArpReqFrame (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| send a ARP request packet. More... | |
| void | SendEchoReqFrame (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| send a Echo request packet. More... | |
| int | ProcessRecvFrame (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId) |
| process the received packet. More... | |
| int | XAxienet_Send (XAxiEthernet *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId, UINTPTR TxBufPtr, u32 len) |
| Sends a frame through AXI Ethernet and MCDMA. More... | |
| int | XAxiEnet_Recv (XMcdma *InstancePtr) |
| Receives a frame through AXI Ethernet and MCDMA. More... | |
| int | PhySetup (XAxiEthernet *AxiEthernetInstancePtr) |
| Sets up the PHY for the ping example. More... | |
| int | RxSetup (XMcdma *McDmaInstPtr, XAxiEthernet *AxiEthernetInstancePtr, u8 ChanId, u32 NumPkts) |
| Sets up receive path resources for the example. More... | |
| int | GetBufAddr () |
| Returns a transmit buffer address for the channel. More... | |
| int | GetRxBufAddr () |
| Returns a receive buffer address for the channel. More... | |
Configuration options | |
Device configuration options used with XAxiEthernet_SetOptions(), XAxiEthernet_ClearOptions(), and XAxiEthernet_GetOptions(). The default state of each option is noted below. XAE_DEFAULT_OPTIONS is the bitmask applied by XAxiEthernet_Reset() and XAxiEthernet_CfgInitialize(). | |
| #define | XAE_PROMISC_OPTION 0x00000001 |
| Accepts all incoming packets. More... | |
| #define | XAE_JUMBO_OPTION 0x00000002 |
| Accepts jumbo frames for TX and RX. More... | |
| #define | XAE_VLAN_OPTION 0x00000004 |
| Enables VLAN support for TX and RX. More... | |
| #define | XAE_FLOW_CONTROL_OPTION 0x00000008 |
| Recognizes received flow control frames. More... | |
| #define | XAE_FCS_STRIP_OPTION 0x00000010 |
| Strips FCS and PAD from RX frames. More... | |
| #define | XAE_FCS_INSERT_OPTION 0x00000020 |
| Inserts FCS and PAD on TX frames. More... | |
| #define | XAE_LENTYPE_ERR_OPTION 0x00000040 |
| Enables Length/Type error checking on RX. More... | |
| #define | XAE_TRANSMITTER_ENABLE_OPTION 0x00000080 |
| Enables the transmitter. More... | |
| #define | XAE_RECEIVER_ENABLE_OPTION 0x00000100 |
| Enables the receiver. More... | |
| #define | XAE_BROADCAST_OPTION 0x00000200 |
| Receives broadcast frames. More... | |
| #define | XAE_MULTICAST_OPTION 0x00000400 |
| Receives programmed multicast frames. More... | |
| #define | XAE_EXT_MULTICAST_OPTION 0x00000800 |
| Enables the extended multicast address table. More... | |
| #define | XAE_EXT_TXVLAN_TRAN_OPTION 0x00001000 |
| Enables TX VLAN translation. More... | |
| #define | XAE_EXT_RXVLAN_TRAN_OPTION 0x00002000 |
| Enables RX VLAN translation. More... | |
| #define | XAE_EXT_TXVLAN_TAG_OPTION 0x00004000 |
| Enables TX VLAN tagging. More... | |
| #define | XAE_EXT_RXVLAN_TAG_OPTION 0x00008000 |
| Enables RX VLAN tagging. More... | |
| #define | XAE_EXT_TXVLAN_STRP_OPTION 0x00010000 |
| Enables TX VLAN stripping. More... | |
| #define | XAE_EXT_RXVLAN_STRP_OPTION 0x00020000 |
| Enables RX VLAN stripping. More... | |
| #define | XAE_DEFAULT_OPTIONS (XAE_FLOW_CONTROL_OPTION | XAE_BROADCAST_OPTION | XAE_FCS_INSERT_OPTION | XAE_FCS_STRIP_OPTION | XAE_LENTYPE_ERR_OPTION | XAE_TRANSMITTER_ENABLE_OPTION | XAE_RECEIVER_ENABLE_OPTION) |
| Default options applied by XAxiEthernet_Reset() and XAxiEthernet_CfgInitialize(). More... | |
Ethernet buffer size constants | |
Constants that help upper layers size memory pools for Ethernet buffers and descriptor lists. | |
| #define | XAE_MAC_ADDR_SIZE 6 |
| Size of a MAC address in bytes. More... | |
| #define | XAE_MTU 1500 |
| Maximum MTU size of an Ethernet frame. More... | |
| #define | XAE_JUMBO_MTU 8982 |
| Maximum MTU size of a jumbo Ethernet frame. More... | |
| #define | XAE_HDR_SIZE 14 |
| Size of an Ethernet header in bytes. More... | |
| #define | XAE_HDR_VLAN_SIZE 18 |
| Size of an Ethernet header with VLAN in bytes. More... | |
| #define | XAE_TRL_SIZE 4 |
| Size of an Ethernet trailer (FCS) in bytes. More... | |
| #define | XAE_MAX_FRAME_SIZE (XAE_MTU + XAE_HDR_SIZE + XAE_TRL_SIZE) |
| Maximum Ethernet frame size including header and trailer. More... | |
| #define | XAE_MAX_VLAN_FRAME_SIZE (XAE_MTU + XAE_HDR_VLAN_SIZE + XAE_TRL_SIZE) |
| Maximum VLAN Ethernet frame size including header and trailer. More... | |
| #define | XAE_MAX_JUMBO_FRAME_SIZE (XAE_JUMBO_MTU + XAE_HDR_SIZE + XAE_TRL_SIZE) |
| Maximum jumbo Ethernet frame size including header and trailer. More... | |
PHY interface type constants | |
Values returned by XAxiEthernet_GetPhysicalInterface(). These match design parameters from the AXI Ethernet specification. | |
| #define | XAE_PHY_TYPE_RGMII 9 |
| RGMII PHY interface type. More... | |
| #define | XAE_PHY_TYPE_RGMII_ID 10 |
| RGMII with internal delay PHY interface type. More... | |
| #define | XAE_PHY_TYPE_RGMII_RXID 11 |
| RGMII with RX internal delay PHY interface type. More... | |
| #define | XAE_PHY_TYPE_RGMII_TXID 12 |
| RGMII with TX internal delay PHY interface type. More... | |
| #define | XAE_PHY_INTERFACE_MODE_NA 0 |
| PHY interface mode is not applicable. More... | |
| #define | XAE_PHY_TYPE_MII 2 |
| MII PHY interface type. More... | |
| #define | XAE_PHY_TYPE_GMII 3 |
| GMII PHY interface type. More... | |
| #define | XAE_PHY_TYPE_SGMII 4 |
| SGMII PHY interface type. More... | |
| #define | XAE_PHY_TYPE_RGMII_1_3 XAE_PHY_TYPE_RGMII |
| RGMII 1.3 PHY interface type. More... | |
| #define | XAE_PHY_TYPE_RGMII_2_0 XAE_PHY_TYPE_RGMII_RXID |
| RGMII 2.0 PHY interface type. More... | |
| #define | XAE_PHY_TYPE_1000BASE_X 21 |
| 1000BASE-X PHY interface type. More... | |
VLAN tag and strip mode constants | |
Values passed into XAxiEthernet_SetVTagMode() and XAxiEthernet_SetVStripMode() and returned by XAxiEthernet_GetVTagMode() and XAxiEthernet_GetVStripMode(). | |
| #define | XAE_VTAG_NONE 0 |
| No VLAN tagging. More... | |
| #define | XAE_VTAG_ALL 1 |
| Tag all frames. More... | |
| #define | XAE_VTAG_EXISTED 2 |
| Tag already tagged frames. More... | |
| #define | XAE_VTAG_SELECT 3 |
| Tag selected already tagged frames. More... | |
| #define | XAE_DEFAULT_TXVTAG_MODE XAE_VTAG_ALL |
| Default TX VLAN tag mode. More... | |
| #define | XAE_DEFAULT_RXVTAG_MODE XAE_VTAG_ALL |
| Default RX VLAN tag mode. More... | |
| #define | XAE_VSTRP_NONE 0 |
| No VLAN stripping. More... | |
| #define | XAE_VSTRP_ALL 1 |
| Strip one tag from all frames. More... | |
| #define | XAE_VSTRP_SELECT 3 |
| Strip one tag from selected frames. More... | |
| #define | XAE_DEFAULT_TXVSTRP_MODE XAE_VSTRP_ALL |
| Default TX VLAN strip mode. More... | |
| #define | XAE_DEFAULT_RXVSTRP_MODE XAE_VSTRP_ALL |
| Default RX VLAN strip mode. More... | |
TEMAC type constants | |
| #define | XAE_SOFT_TEMAC_10_100_MBPS 0 |
| Soft TEMAC at 10/100 Mbps. More... | |
| #define | XAE_SOFT_TEMAC_10_100_1000_MBPS 1 |
| Soft TEMAC at 10/100/1000 Mbps. More... | |
| #define | XAE_HARD_TEMC 2 |
| Hard TEMAC type. More... | |
AXI Ethernet DMA device type constants | |
| #define | XPAR_AXI_FIFO 1U |
| AXI FIFO device type. More... | |
| #define | XPAR_AXI_DMA 2U |
| AXI DMA device type. More... | |
| #define | XPAR_AXI_MCDMA 3U |
| AXI MCDMA device type. More... | |
AXI Ethernet device type masks | |
| #define | XAE_AXIDEVTYPE_MASK 0xF |
| Mask for the AXI device type field. More... | |
| #define | XAE_AXIBASEADDR_MASK 0xFFFFFFFFFFFFFFF0 |
| Mask for the AXI device base address field. More... | |
| #define ARP_REPLY 0x02 |
ARP status bits indicating reply.
Referenced by ProcessRecvFrame().
| #define ARP_REQ_PKT_SIZE 0x2A |
ARP request packet size.
Referenced by SendArpReqFrame().
| #define ARP_REQ_SRC_IP_LOC 14 |
Src IP add loc of ARP req Packet.
Referenced by ProcessRecvFrame().
| #define ARP_REQ_STATUS_LOC 10 |
ARP request loc.
Referenced by ProcessRecvFrame().
| #define ARP_REQUEST 0x01 |
ARP Request bits in Rx packet.
Referenced by SendArpReqFrame().
| #define AVB_PTP_INTERRUPT_ID XPAR_INTC_0_AXIETHERNET_0_AV_INTERRUPT_10MS_VEC_ID |
AVB PTP timer interrupt ID.
| #define AVB_PTP_RX_INTERRUPT_ID XPAR_INTC_0_AXIETHERNET_0_AV_INTERRUPT_PTP_RX_VEC_ID |
AVB PTP receive interrupt ID.
| #define AXIDMA_DEVICE_ID XPAR_AXIDMA_0_DEVICE_ID |
AXI DMA device ID.
| #define AXIETHERNET_DEVICE_ID XPAR_AXIETHERNET_0_DEVICE_ID |
Device ID for AXI Ethernet.
| #define AXIETHERNET_DEVICE_ID XPAR_AXIETHERNET_0_DEVICE_ID |
The following constants map to the XPAR parameters created in the.
xparameters.h file. They are defined here such that a user can easily change all the needed parameters in one place.AXI Ethernet device ID.
Referenced by main().
| #define AXIETHERNET_DEVICE_ID XPAR_AXIETHERNET_0_DEVICE_ID |
AXI Ethernet device ID.
| #define AXIETHERNET_LOOPBACK_SPEED 100 |
100Mb/s for Mii.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| #define AXIETHERNET_LOOPBACK_SPEED_1G 1000 |
1000Mb/s for GMii.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| #define AXIETHERNET_LOOPBACK_SPEED_2p5G 2500 |
2p5G for 2.5G MAC.
Referenced by AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| #define AXIETHERNET_PHY_DELAY_SEC 4 |
Amount of time to delay waiting on PHY to reset.
Referenced by AxiEthernetUtilEnterLoopback().
| #define BD_ALIGNMENT 64 |
Byte alignment of BDs.
| #define BD_ALIGNMENT 64 |
Byte alignment of BDs.
| #define BD_ALIGNMENT XAXIDMA_BD_MINIMUM_ALIGNMENT |
Byte alignment of BDs.
Referenced by AxiEthernetExtVlanExample().
| #define BD_ALIGNMENT XAXIDMA_BD_MINIMUM_ALIGNMENT |
Byte alignment of BDs.
Referenced by AxiEthernetMcastExample().
| #define BD_ALIGNMENT 64 |
Byte alignment of BDs.
| #define BD_ALIGNMENT XAXIDMA_BD_MINIMUM_ALIGNMENT*2 |
Byte alignment required for buffer descriptors.
Referenced by AxiEthernetSgDmaIntrExample().
| #define BD_RX_STATUS_OFFSET 2 |
BD RX STATUS OFFSET.
| #define BD_USR0_OFFSET 0 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 0 means, Control Word 0, used for enabling checksum offloading.
| #define BD_USR0_OFFSET 0 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 0 means, Control Word 0, used for enabling checksum offloading.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample(), and AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define BD_USR0_OFFSET 0 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 0 means, Control Word 0, used for enabling checksum offloading.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample(), and AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define BD_USR1_OFFSET 1 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 1 means, Control Word 1, used for mentioning checksum begin and checksum insert points.
| #define BD_USR1_OFFSET 1 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 1 means, Control Word 1, used for mentioning checksum begin and checksum insert points.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define BD_USR1_OFFSET 1 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 1 means, Control Word 1, used for mentioning checksum begin and checksum insert points.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define BD_USR2_OFFSET 2 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 2 means, Control Word 2, used for mentioning checksum seed.
| #define BD_USR2_OFFSET 2 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 2 means, Control Word 2, used for mentioning checksum seed.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define BD_USR2_OFFSET 2 |
AXI4-Stream Control Word offset from the start of app user words in BD.
Offset 2 means, Control Word 2, used for mentioning checksum seed.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define BD_VLAN_TPID_OFFSET 3 |
AXI4-Stream status Word offset from the start of app user words in BD.
TPID is at status word 3, bits 31-16.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define BD_VLAN_VID_OFFSET 4 |
AXI4-Stream status word offset from the start of app user words in BD.
VID is at status word 4, bits 31-16.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define BLOCK_SIZE_2MB 0x200000U |
BLOCK SIZE 2MB.
Referenced by AxiEthernetSgDmaPollExample().
| #define BLOCK_SIZE_2MB 0x200000U |
BLOCK SIZE 2MB.
Referenced by AxiEthernetSgDmaIntrExample().
| #define BROADCAST_ADDR 0xFFFF |
Broadcast Address.
Referenced by SendArpReqFrame().
| #define CORRECT_CHECKSUM_VALUE 0xFFFF |
Correct checksum value.
Referenced by ProcessRecvFrame().
| #define DELAY 1000000 |
Used to introduce delay.
Referenced by AxiEthernetPingReqExample().
| #define DUMMY_TCP_PORT_1 0x1111 |
DUMMY TCP PORT 1.
| #define DUMMY_TCP_PORT_1 0x1111 |
DUMMY TCP PORT 1.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define DUMMY_TCP_PORT_1 0x1111 |
DUMMY TCP PORT 1.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define DUMMY_TCP_PORT_2 0x1112 |
DUMMY TCP PORT 2.
| #define DUMMY_TCP_PORT_2 0x1112 |
DUMMY TCP PORT 2.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define DUMMY_TCP_PORT_2 0x1112 |
DUMMY TCP PORT 2.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define ECHO_REPLY 0x00 |
Echo reply.
Referenced by ProcessRecvFrame().
| #define ETH_SYSTEM_ADDRESS_EUI48_HIGH 0x000A35 |
Upper bytes of the Ethernet EUI-48 address.
Referenced by main().
| #define ETH_SYSTEM_ADDRESS_EUI48_LOW 0x010203 |
Lower bytes of the Ethernet EUI-48 address.
Referenced by main().
| #define ETHER_PROTO_TYPE_LOC 6 |
Ethernet Proto type loc.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define FIFO_DEVICE_ID XPAR_AXI_FIFO_0_DEVICE_ID |
Device ID for AXI FIFO.
| #define FULL_CSUM_ENABLE 0x00000002 |
Option for full csum enable.
| #define FULL_CSUM_ENABLE 0x00000002 |
Option for full csum enable.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define FULL_CSUM_ENABLE 0x00000002 |
Option for full csum enable.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define FULL_CSUM_STATUS_MASK 0x00000038 |
Mask to extract full checksum status field from AXI4 Stream Status Word 2.
| #define FULL_CSUM_STATUS_MASK 0x00000038 |
Mask to extract full checksum status field from AXI4 Stream Status Word 2.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define FULL_CSUM_STATUS_MASK 0x00000038 |
Mask to extract full checksum status field from AXI4 Stream Status Word 2.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define FULL_CSUM_VALIDATED 0x00000002 |
If bits 3-5 in AXI4 Status word have a value of 0x010, it means both IP and TCP checksums have been found to be correct.
| #define FULL_CSUM_VALIDATED 0x00000002 |
If bits 3-5 in AXI4 Status word have a value of 0x010, it means both IP and TCP checksums have been found to be correct.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define FULL_CSUM_VALIDATED 0x00000002 |
If bits 3-5 in AXI4 Status word have a value of 0x010, it means both IP and TCP checksums have been found to be correct.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define HW_TYPE 0x01 |
Hardware type (10/100 Mbps).
Referenced by SendArpReqFrame().
| #define ICMP_DATA_CHECKSUM_LOC 18 |
ICMP data checksum location.
Referenced by SendEchoReqFrame().
| #define ICMP_DATA_FIELD_LEN 20 |
Data field length.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define ICMP_DATA_LEN 18 |
ICMP data length.
Referenced by SendEchoReqFrame().
| #define ICMP_DATA_LOC 19 |
ICMP data loc including identifier number and sequence number.
| #define ICMP_DATA_START_LOC 17 |
Data field start location.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define ICMP_ECHO_FIELD_LOC 17 |
Echo field loc.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define ICMP_IDEN_FIELD_LOC 19 |
Identifier field loc.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define ICMP_KNOWN_DATA_LEN 16 |
ICMP known data length.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define ICMP_KNOWN_DATA_LOC 21 |
ICMP known data start loc.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define ICMP_PKT_SIZE 0x4A |
ICMP packet length 74 Bytes including Src and dest MAC Add.
Referenced by GetBufAddr(), and SendEchoReqFrame().
| #define ICMP_SEQ_NO_LOC 20 |
sequence number location.
Referenced by ProcessRecvFrame().
| #define IDEN_NUM 0x02 |
ICMP identifier number.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define IP_ADDR_LEN 2 |
Size of IP address.
Referenced by ProcessRecvFrame(), SendArpReqFrame(), and SendEchoReqFrame().
| #define IP_ADDR_SIZE 4 |
IP Address size in Bytes.
| #define IP_CHECKSUM_LOC 12 |
IP header checksum location.
Referenced by SendEchoReqFrame().
| #define IP_CSUM_OK_TCP_NOT_CHECKED 0x00000001 |
IP CSUM OK TCP NOT CHECKED.
| #define IP_CSUM_OK_TCP_NOT_CHECKED 0x00000001 |
IP CSUM OK TCP NOT CHECKED.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_CSUM_OK_TCP_NOT_CHECKED 0x00000001 |
IP CSUM OK TCP NOT CHECKED.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_CSUM_OK_TCP_NOT_OK 0x00000006 |
IP CSUM OK TCP NOT OK.
| #define IP_CSUM_OK_TCP_NOT_OK 0x00000006 |
IP CSUM OK TCP NOT OK.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_CSUM_OK_TCP_NOT_OK 0x00000006 |
IP CSUM OK TCP NOT OK.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_INFO_LEN 7 |
IP header information length.
| #define IP_HEADER_LEN 10 |
IP header length.
Referenced by SendEchoReqFrame().
| #define IP_HEADER_LEN_IN_WORDS 0x05 |
For our case, the header length is always 20 bytes (5 words.
| #define IP_HEADER_LEN_IN_WORDS 0x05 |
For our case, the header length is always 20 bytes (5 words.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_LEN_IN_WORDS 0x05 |
For our case, the header length is always 20 bytes (5 words.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_LENGTH 20 |
IP header length in bytes.
Used as offset to kigure out the start of TCP header.
| #define IP_HEADER_LENGTH 20 |
IP header length in bytes.
Used as offset to kigure out the start of TCP header.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_LENGTH 20 |
IP header length in bytes.
Used as offset to kigure out the start of TCP header.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_PROTOCOL_TCP 0x6 |
IP header protocol entry.
For TCP packets, it is 6.
| #define IP_HEADER_PROTOCOL_TCP 0x6 |
IP header protocol entry.
For TCP packets, it is 6.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_PROTOCOL_TCP 0x6 |
IP header protocol entry.
For TCP packets, it is 6.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_PROTOCOL_UDP 0x17 |
IP header protocol entry.
For UDP packets, it is 17.
| #define IP_HEADER_PROTOCOL_UDP 0x17 |
IP header protocol entry.
For UDP packets, it is 17.
| #define IP_HEADER_PROTOCOL_UDP 0x17 |
IP header protocol entry.
For UDP packets, it is 17.
| #define IP_HEADER_VERSION 0x04 |
For IPv4, the version entry in IP header is always 4.
| #define IP_HEADER_VERSION 0x04 |
For IPv4, the version entry in IP header is always 4.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_HEADER_VERSION 0x04 |
For IPv4, the version entry in IP header is always 4.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_REQ_DEST_IP_LOC 15 |
Dest IP add loc of ICMP req.
Referenced by SendEchoReqFrame().
| #define IP_REQ_SRC_IP_LOC 13 |
Src IP add loc of ICMP req.
Referenced by SendEchoReqFrame().
| #define IP_START_LOC 7 |
IP header start location.
Referenced by SendEchoReqFrame().
| #define IP_TCP_CSUMS_NOT_CHECKED 0x00000000 |
IP TCP CSUMS NOT CHECKED.
| #define IP_TCP_CSUMS_NOT_CHECKED 0x00000000 |
IP TCP CSUMS NOT CHECKED.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_TCP_CSUMS_NOT_CHECKED 0x00000000 |
IP TCP CSUMS NOT CHECKED.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_VERSION 0x0604 |
IP version ipv4/ipv6.
Referenced by SendArpReqFrame().
| #define IP_VERSION_4 0x800 |
For IPV4, the Ethernet frame type/length field will have a value of 0x800.
| #define IP_VERSION_4 0x800 |
For IPV4, the Ethernet frame type/length field will have a value of 0x800.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define IP_VERSION_4 0x800 |
For IPV4, the Ethernet frame type/length field will have a value of 0x800.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define MAC_ADDR_LEN 3 |
MAC address length.
Referenced by ProcessRecvFrame(), SendArpReqFrame(), and SendEchoReqFrame().
| #define MARVEL_PHY_88E1111_MODEL 0xC0 |
MARVEL PHY 88E1111 MODEL.
Referenced by AxiEthernetUtilEnterLoopback().
| #define MARVEL_PHY_88E1116R_MODEL 0x240 |
MARVEL PHY 88E1116R MODEL.
Referenced by AxiEthernetUtilEnterLoopback().
| #define MAX_MULTICAST_ADDR (1<<23) |
Maximum number of multicast Ethernet MAC addresses.
| #define NUM_OF_PING_REQ_PKTS 10 |
Number of ping req it generates.
Referenced by AxiEthernetPingReqExample(), and ProcessRecvFrame().
| #define NUM_PACK_CHECK_RX_PACK 8000000 |
Max number of pack to be checked before to identify a Rx packet.
Referenced by AxiEthernetPingReqExample().
| #define NUM_PACKETS 50 |
Number of packets to send in the example.
Referenced by AxiEthernetSgDmaIntrMultiFrameExample(), and AxiEthernetSgDmaMultiFrameExample().
| #define NUM_RX_PACK_CHECK_REQ 10 |
Max num of Rx pack to be checked before sending another request.
Referenced by AxiEthernetPingReqExample().
| #define PARTIAL_CSUM_ENABLE 0x00000001 |
Option for partial csum enable.
| #define PARTIAL_CSUM_ENABLE 0x00000001 |
Option for partial csum enable.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define PARTIAL_CSUM_ENABLE 0x00000001 |
Option for partial csum enable.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define PAYLOAD_SIZE 1000 |
Payload size used in examples.
Referenced by AxiEthernetSgDmaMultiFrameExample(), and AxiEthernetSgDmaSingleFrameExample().
| #define PAYLOAD_SIZE 1000 |
Payload size used in examples.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define PAYLOAD_SIZE 1000 |
Payload size used in examples.
Referenced by AxiEthernetSgDmaIntrExtMulticastExample().
| #define PAYLOAD_SIZE 100 |
Payload size used in examples.
Referenced by AxiEthernetSingleFrameIntrExample().
| #define PAYLOAD_SIZE 1000 |
Payload size used in examples.
Referenced by AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), and AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define PAYLOAD_SIZE 1000 |
Payload size used in examples.
Referenced by AxiEthernetSgDmaIntrSingleFrameExample(), and AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define PHY_DETECT_MASK 0x1808 |
PHY detect register mask.
| #define PHY_DETECT_MASK 0x1808 |
PHY detect register feature mask.
Referenced by AxiEthernetDetectPHY().
| #define PHY_DETECT_REG 1 |
PHY DETECT REG.
| #define PHY_DETECT_REG 1 |
MII status register used to detect the PHY.
Referenced by AxiEthernetDetectPHY().
| #define PHY_MODEL_NUM_MASK 0x3F0 |
PHY MODEL NUM MASK.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_PG2_R21_CTRL_REG 21 |
PHY PG2 R21 CTRL REG.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R0_ANEG_ENABLE 0x1000 |
PHY auto-negotiation enable bit.
Referenced by AxiEthernetUtilConfigureInternalPhy(), AxiEthernetUtilEnterLoopback(), and PhySetup().
| #define PHY_R0_CTRL_REG 0 |
PHY R0 CTRL REG.
Referenced by AxiEthernetUtilConfigureInternalPhy(), AxiEthernetUtilEnterLoopback(), and PhySetup().
| #define PHY_R0_DFT_SPD_10 0x0000 |
PHY default speed bit for 10 Mbps.
Referenced by AxiEthernetUtilConfigureInternalPhy(), and AxiEthernetUtilEnterLoopback().
| #define PHY_R0_DFT_SPD_100 0x2000 |
PHY default speed bit for 100 Mbps.
Referenced by AxiEthernetUtilConfigureInternalPhy(), and AxiEthernetUtilEnterLoopback().
| #define PHY_R0_DFT_SPD_1000 0x0040 |
PHY default speed bit for 1000 Mbps.
Referenced by AxiEthernetUtilConfigureInternalPhy(), and AxiEthernetUtilEnterLoopback().
| #define PHY_R0_DFT_SPD_1000 0x0040 |
PHY default speed bit for 1000 Mbps.
Referenced by PhySetup().
| #define PHY_R0_DFT_SPD_2500 0x0040 |
Default PHY speed bits for 2500 Mbps.
Referenced by AxiEthernetUtilConfigureInternalPhy(), and AxiEthernetUtilEnterLoopback().
| #define PHY_R0_DFT_SPD_MASK 0x2040 |
PHY default speed field mask.
| #define PHY_R0_ISOLATE 0x0400 |
PHY R0 ISOLATE.
Referenced by AxiEthernetUtilConfigureInternalPhy(), and PhySetup().
| #define PHY_R0_LOOPBACK 0x4000 |
PHY control register loopback bit.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R0_LOOPBACK 0x4000 |
PHY control register loopback bit.
| #define PHY_R0_RESET 0x8000 |
PHY control register reset bit.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R0_RESET 0x8000 |
PHY control register reset bit.
| #define PHY_R20_DFT_SPD_10 0x20 |
PHY R20 DFT SPD 10.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R20_DFT_SPD_100 0x50 |
PHY R20 DFT SPD 100.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R20_DFT_SPD_1000 0x60 |
PHY R20 DFT SPD 1000.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R20_EXTND_CTRL_REG 20 |
PHY R20 EXTND CTRL REG.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R20_RX_DLY 0x80 |
PHY R20 RX DLY.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R22_PAGE_ADDR_REG 22 |
PHY R22 PAGE ADDR REG.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R27_EXTND_STS_REG 27 |
PHY R27 EXTND STS REG.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R27_MAC_CONFIG_GMII 0x000F |
PHY R27 MAC CONFIG GMII.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R27_MAC_CONFIG_MII 0x000F |
PHY R27 MAC CONFIG MII.
| #define PHY_R27_MAC_CONFIG_RGMII 0x000B |
PHY R27 MAC CONFIG RGMII.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R27_MAC_CONFIG_SGMII 0x0004 |
PHY R27 MAC CONFIG SGMII.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_R3_PHY_IDENT_REG 3 |
PHY identifier register address.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_REG21_10 0x0030 |
PHY REG21 10.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_REG21_100 0x2030 |
PHY REG21 100.
Referenced by AxiEthernetUtilEnterLoopback().
| #define PHY_REG21_1000 0x0070 |
PHY REG21 1000.
Referenced by AxiEthernetUtilEnterLoopback().
| #define RCV_FRM_NOT_CORRUPTED 0xFFFF |
If the received frame is not corrupted, for partial csum offloading case, the control word 3 would return 0xFFFF.
| #define RCV_FRM_NOT_CORRUPTED 0xFFFF |
If the received frame is not corrupted, for partial csum offloading case, the control word 3 would return 0xFFFF.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define RCV_FRM_NOT_CORRUPTED 0xFFFF |
If the received frame is not corrupted, for partial csum offloading case, the control word 3 would return 0xFFFF.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define RXBD_CNT 1024 |
Number of RxBDs to use.
Referenced by AxiEthernetSgDmaPollExample().
| #define RXBD_CNT 1024 |
Number of RxBDs to use.
| #define RXBD_CNT 128 |
Number of RxBDs to use.
Referenced by AxiEthernetExtVlanExample().
| #define RXBD_CNT 128 |
Number of RxBDs to use.
Referenced by AxiEthernetMcastExample().
| #define RXBD_CNT 1024 |
Number of RxBDs to use.
Referenced by AxiEthernetSgDmaIntrExample().
| #define RXBD_CNT 128 |
Number of RxBDs to use.
Referenced by AxiEthernetSgDmaIntrExample().
| #define RXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, RXBD_CNT) |
RXBD SPACE BYTES.
| #define RXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, RXBD_CNT) |
RXBD SPACE BYTES.
| #define RXBD_SPACE_BYTES RXBD_CNT * 64 * 16 |
RXBD SPACE BYTES.
| #define RXBD_SPACE_BYTES RXBD_CNT * 64 * 16 |
RXBD SPACE BYTES.
| #define RXBD_SPACE_BYTES RXBD_CNT * 64 * 16 |
RXBD SPACE BYTES.
| #define RXBD_SPACE_BYTES (XAxiDma_BdRingMemCalc(BD_ALIGNMENT, RXBD_CNT)) |
RXBD SPACE BYTES.
| #define SRC_MAC_ADDR_LOC 3 |
Src MAC address location.
Referenced by ProcessRecvFrame(), and SendEchoReqFrame().
| #define TCP_CSUM_NOT_CHECKED_IP_NOT_OK 0x00000005 |
TCP CSUM NOT CHECKED IP NOT OK.
| #define TCP_CSUM_NOT_CHECKED_IP_NOT_OK 0x00000005 |
TCP CSUM NOT CHECKED IP NOT OK.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define TCP_CSUM_NOT_CHECKED_IP_NOT_OK 0x00000005 |
TCP CSUM NOT CHECKED IP NOT OK.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define TCP_HEADER_LEN_IN_WORDS 0x5 |
For our case, the header length is always 20 bytes (5 words).
| #define TCP_HEADER_LEN_IN_WORDS 0x5 |
For our case, the header length is always 20 bytes (5 words).
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define TCP_HEADER_LEN_IN_WORDS 0x5 |
For our case, the header length is always 20 bytes (5 words).
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define TCP_HEADER_LENGTH 20 |
IP header length in bytes.
Used as offset to kigure out the start of TCP header.
| #define TCP_HEADER_LENGTH 20 |
IP header length in bytes.
Used as offset to kigure out the start of TCP header.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define TCP_HEADER_LENGTH 20 |
IP header length in bytes.
Used as offset to kigure out the start of TCP header.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample().
| #define TI_PHY_ADDDR 0xE |
TI PHY ADDDR.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_CFGR2 0x14 |
TI PHY CFGR2.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_CFGR2_SGMII_AUTONEG_EN 0x0080 |
TI PHY CFGR2 SGMII AUTONEG EN.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_CR 0xD |
TI PHY CR.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_CR_DEVAD_DATAEN 0x4000 |
TI PHY CR DEVAD DATAEN.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_CR_DEVAD_EN 0x001F |
TI PHY CR DEVAD EN.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_CR_SGMII_EN 0x0800 |
TI PHY CR SGMII EN.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_IDENTIFIER 0x2000 |
TI PHY IDENTIFIER.
| #define TI_PHY_MODEL 0x230 |
TI PHY MODEL.
Referenced by AxiEthernetUtilEnterLoopback().
| #define TI_PHY_PHYCTRL 0x10 |
TI PHY PHYCTRL.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_SGMIICLK_EN 0x4000 |
TI PHY SGMIICLK EN.
Referenced by AxiEtherentConfigureTIPhy().
| #define TI_PHY_SGMIITYPE 0xD3 |
TI PHY SGMIITYPE.
Referenced by AxiEtherentConfigureTIPhy().
| #define TPID_MASK 0xFFFF0000 |
Mask to extract TPID from the AXI4 STream status word.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define TX_CS_INIT_OFFSET 16 |
Offset in the control word where byte offset in the ethernet frame to start CSUM calculation need to be inserted.
| #define TX_CS_INIT_OFFSET 16 |
Offset in the control word where byte offset in the ethernet frame to start CSUM calculation need to be inserted.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define TX_CS_INIT_OFFSET 16 |
Offset in the control word where byte offset in the ethernet frame to start CSUM calculation need to be inserted.
Referenced by AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define TXBD_CNT 1024 |
Number of TxBDs to use.
Referenced by AxiEthernetSgDmaPollExample().
| #define TXBD_CNT 1024 |
Number of TxBDs to use.
| #define TXBD_CNT 128 |
Number of TxBDs to use.
Referenced by AxiEthernetExtVlanExample().
| #define TXBD_CNT 128 |
Number of TxBDs to use.
Referenced by AxiEthernetMcastExample().
| #define TXBD_CNT 1024 |
Number of TxBDs to use.
Referenced by AxiEthernetSgDmaIntrExample().
| #define TXBD_CNT 128 |
Number of TxBDs to use.
Referenced by AxiEthernetSgDmaIntrExample().
| #define TXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, TXBD_CNT) |
TXBD SPACE BYTES.
| #define TXBD_SPACE_BYTES XAxiDma_BdRingMemCalc(BD_ALIGNMENT, TXBD_CNT) |
TXBD SPACE BYTES.
| #define TXBD_SPACE_BYTES TXBD_CNT * 64 * 16 |
TXBD SPACE BYTES.
| #define TXBD_SPACE_BYTES TXBD_CNT * 64 * 16 |
TXBD SPACE BYTES.
| #define TXBD_SPACE_BYTES TXBD_CNT * 64 * 16 |
TXBD SPACE BYTES.
| #define TXBD_SPACE_BYTES (XAxiDma_BdRingMemCalc(BD_ALIGNMENT, TXBD_CNT)) |
TXBD SPACE BYTES.
| #define XAE_ARP_PACKET_SIZE 28 |
Max ARP packet size.
| #define XAE_AXIBASEADDR_MASK 0xFFFFFFFFFFFFFFF0 |
Mask for the AXI device base address field.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPingReqExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaPollExample(), XAxiEthernet_CfgInitialize(), and XAxiEthernet_Initialize().
| #define XAE_AXIDEVTYPE_MASK 0xF |
Mask for the AXI device type field.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPingReqExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaPollExample(), XAxiEthernet_CfgInitialize(), and XAxiEthernet_Initialize().
| #define XAE_BROADCAST_OPTION 0x00000200 |
Receives broadcast frames.
Default is on.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_DEFAULT_OPTIONS (XAE_FLOW_CONTROL_OPTION | XAE_BROADCAST_OPTION | XAE_FCS_INSERT_OPTION | XAE_FCS_STRIP_OPTION | XAE_LENTYPE_ERR_OPTION | XAE_TRANSMITTER_ENABLE_OPTION | XAE_RECEIVER_ENABLE_OPTION) |
Default options applied by XAxiEthernet_Reset() and XAxiEthernet_CfgInitialize().
Referenced by AxiEthernetSgDmaIntrExtMulticastExample(), XAxiEthernet_Reset(), and XAxiEthernet_SetOptions().
| #define XAE_DEFAULT_RXVSTRP_MODE XAE_VSTRP_ALL |
Default RX VLAN strip mode.
Referenced by XAxiEthernet_SetOptions().
| #define XAE_DEFAULT_RXVTAG_MODE XAE_VTAG_ALL |
Default RX VLAN tag mode.
Referenced by XAxiEthernet_SetOptions().
| #define XAE_DEFAULT_TXVSTRP_MODE XAE_VSTRP_ALL |
Default TX VLAN strip mode.
Referenced by XAxiEthernet_SetOptions().
| #define XAE_DEFAULT_TXVTAG_MODE XAE_VTAG_ALL |
Default TX VLAN tag mode.
Referenced by XAxiEthernet_SetOptions().
| #define XAE_ETHER_PROTO_TYPE_ARP 0x0806 |
ARP Protocol.
Referenced by ProcessRecvFrame(), and SendArpReqFrame().
| #define XAE_ETHER_PROTO_TYPE_IP 0x0800 |
IP Protocol.
Referenced by ProcessRecvFrame(), SendArpReqFrame(), and SendEchoReqFrame().
| #define XAE_ETHER_PROTO_TYPE_VLAN 0x8100 |
VLAN Tagged.
| #define XAE_EXT_MULTICAST_OPTION 0x00000800 |
Enables the extended multicast address table.
Default depends on hardware.
Referenced by AxiEthernetSgDmaIntrExtMulticastExample().
| #define XAE_EXT_RXVLAN_STRP_OPTION 0x00020000 |
Enables RX VLAN stripping.
Default depends on hardware.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define XAE_EXT_RXVLAN_TAG_OPTION 0x00008000 |
Enables RX VLAN tagging.
Default depends on hardware.
| #define XAE_EXT_RXVLAN_TRAN_OPTION 0x00002000 |
Enables RX VLAN translation.
Default depends on hardware.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define XAE_EXT_TXVLAN_STRP_OPTION 0x00010000 |
Enables TX VLAN stripping.
Default depends on hardware.
| #define XAE_EXT_TXVLAN_TAG_OPTION 0x00004000 |
Enables TX VLAN tagging.
Default depends on hardware.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define XAE_EXT_TXVLAN_TRAN_OPTION 0x00001000 |
Enables TX VLAN translation.
Default depends on hardware.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define XAE_FCS_INSERT_OPTION 0x00000020 |
Inserts FCS and PAD on TX frames.
Default is on.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_FCS_STRIP_OPTION 0x00000010 |
Strips FCS and PAD from RX frames.
Default is on.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_FLOW_CONTROL_OPTION 0x00000008 |
Recognizes received flow control frames.
Default is on.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_HARD_TEMC 2 |
Hard TEMAC type.
| #define XAE_HDR_SIZE 14 |
Size of an Ethernet header in bytes.
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), AxiEthernetSingleFramePolledExample(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameSetVlanPayloadData(), and AxiEthernetUtilFrameVerify().
| #define XAE_HDR_VLAN_SIZE 18 |
Size of an Ethernet header with VLAN in bytes.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| #define XAE_HEADER_IP_LENGTH_OFFSET 16 |
IP Length Offset.
| #define XAE_JUMBO_MTU 8982 |
Maximum MTU size of a jumbo Ethernet frame.
Referenced by GetRxBufAddr(), and RxSetup().
| #define XAE_JUMBO_OPTION 0x00000002 |
Accepts jumbo frames for TX and RX.
Default is off.
Referenced by AxiEthernetSgDmaIntrExtVlanExample(), XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_LENTYPE_ERR_OPTION 0x00000040 |
Enables Length/Type error checking on RX.
Default is on.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_MAC_ADDR_SIZE 6 |
Size of a MAC address in bytes.
Referenced by AxiEnthernetSetMAC(), AxiEthernetSgDmaPollExample(), and AxiEthernetUtilFrameHdrFormatMAC().
| #define XAE_MAX_FRAME_SIZE (XAE_MTU + XAE_HDR_SIZE + XAE_TRL_SIZE) |
Maximum Ethernet frame size including header and trailer.
| #define XAE_MAX_JUMBO_FRAME_SIZE (XAE_JUMBO_MTU + XAE_HDR_SIZE + XAE_TRL_SIZE) |
Maximum jumbo Ethernet frame size including header and trailer.
Referenced by AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrSingleFrameExample(), and AxiEthernetSgDmaPartialChecksumOffloadExample().
| #define XAE_MAX_VLAN_FRAME_SIZE (XAE_MTU + XAE_HDR_VLAN_SIZE + XAE_TRL_SIZE) |
Maximum VLAN Ethernet frame size including header and trailer.
| #define XAE_MDIO_DIV_DFT 29 |
Default MDIO clock divisor.
| #define XAE_MTU 1500 |
Maximum MTU size of an Ethernet frame.
Referenced by AxiEthernetSingleFrameNonContIntrExample().
| #define XAE_MULTICAST_OPTION 0x00000400 |
Receives programmed multicast frames.
Default is off.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_PHY_INTERFACE_MODE_NA 0 |
PHY interface mode is not applicable.
| #define XAE_PHY_TYPE_1000BASE_X 21 |
1000BASE-X PHY interface type.
Referenced by AxiEthernetUtilEnterLoopback(), and XAxiEthernet_SetOperatingSpeed().
| #define XAE_PHY_TYPE_GMII 3 |
GMII PHY interface type.
Referenced by AxiEthernetUtilEnterLoopback().
| #define XAE_PHY_TYPE_MII 2 |
MII PHY interface type.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaPollExample(), AxiEthernetUtilEnterLoopback(), and XAxiEthernet_SetOperatingSpeed().
| #define XAE_PHY_TYPE_RGMII 9 |
RGMII PHY interface type.
| #define XAE_PHY_TYPE_RGMII_1_3 XAE_PHY_TYPE_RGMII |
RGMII 1.3 PHY interface type.
Referenced by AxiEthernetUtilEnterLoopback(), and XAxiEthernet_GetRgmiiStatus().
| #define XAE_PHY_TYPE_RGMII_2_0 XAE_PHY_TYPE_RGMII_RXID |
RGMII 2.0 PHY interface type.
Referenced by AxiEthernetUtilEnterLoopback(), and XAxiEthernet_GetRgmiiStatus().
| #define XAE_PHY_TYPE_RGMII_ID 10 |
RGMII with internal delay PHY interface type.
| #define XAE_PHY_TYPE_RGMII_RXID 11 |
RGMII with RX internal delay PHY interface type.
| #define XAE_PHY_TYPE_RGMII_TXID 12 |
RGMII with TX internal delay PHY interface type.
| #define XAE_PHY_TYPE_SGMII 4 |
SGMII PHY interface type.
Referenced by AxiEthernetUtilEnterLoopback(), and XAxiEthernet_GetSgmiiStatus().
| #define XAE_PROMISC_OPTION 0x00000001 |
Accepts all incoming packets.
Default is off.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_RECEIVER_ENABLE_OPTION 0x00000100 |
Enables the receiver.
Default is on.
Referenced by AxiEthernetPingReqExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), XAxiEthernet_ClearOptions(), XAxiEthernet_SetOptions(), and XAxiEthernet_Start().
| #define XAE_RX 1 |
Receive direction.
Referenced by AxiEthernetSgDmaIntrExtVlanExample(), XAxiEthernet_GetVidTable(), XAxiEthernet_GetVStripMode(), XAxiEthernet_GetVTagMode(), XAxiEthernet_GetVTagValue(), XAxiEthernet_SetVidTable(), XAxiEthernet_SetVStripMode(), XAxiEthernet_SetVTagMode(), and XAxiEthernet_SetVTagValue().
| #define XAE_SOFT_TEMAC_10_100_1000_MBPS 1 |
Soft TEMAC at 10/100/1000 Mbps.
| #define XAE_SOFT_TEMAC_10_100_MBPS 0 |
Soft TEMAC at 10/100 Mbps.
| #define XAE_TPID_MAX_ENTRIES 4 |
Number of storable TPIDs in the VLAN table.
Referenced by XAxiEthernet_ClearTpid(), XAxiEthernet_GetTpid(), and XAxiEthernet_SetTpid().
| #define XAE_TRANSMITTER_ENABLE_OPTION 0x00000080 |
Enables the transmitter.
Default is on.
Referenced by AxiEthernetPingReqExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), XAxiEthernet_ClearOptions(), XAxiEthernet_SetOptions(), and XAxiEthernet_Start().
| #define XAE_TRL_SIZE 4 |
Size of an Ethernet trailer (FCS) in bytes.
| #define XAE_TX 2 |
Transmit direction.
Referenced by AxiEthernetSgDmaIntrExtVlanExample(), XAxiEthernet_GetVidTable(), XAxiEthernet_GetVStripMode(), XAxiEthernet_GetVTagMode(), XAxiEthernet_GetVTagValue(), XAxiEthernet_SetVidTable(), XAxiEthernet_SetVStripMode(), XAxiEthernet_SetVTagMode(), and XAxiEthernet_SetVTagValue().
| #define XAE_VLAN_OPTION 0x00000004 |
Enables VLAN support for TX and RX.
Default is off.
Referenced by XAxiEthernet_ClearOptions(), and XAxiEthernet_SetOptions().
| #define XAE_VLAN_TAG_SIZE 4 |
VLAN Tag Size.
| #define XAE_VSTRP_ALL 1 |
Strip one tag from all frames.
Referenced by XAxiEthernet_SetVStripMode().
| #define XAE_VSTRP_NONE 0 |
No VLAN stripping.
Referenced by XAxiEthernet_SetVStripMode().
| #define XAE_VSTRP_SELECT 3 |
Strip one tag from selected frames.
Referenced by AxiEthernetSgDmaIntrExtVlanExample(), and XAxiEthernet_SetVStripMode().
| #define XAE_VTAG_ALL 1 |
Tag all frames.
Referenced by XAxiEthernet_SetVTagMode().
| #define XAE_VTAG_EXISTED 2 |
Tag already tagged frames.
Referenced by XAxiEthernet_SetVTagMode().
| #define XAE_VTAG_NONE 0 |
No VLAN tagging.
Referenced by XAxiEthernet_SetVTagMode().
| #define XAE_VTAG_SELECT 3 |
Tag selected already tagged frames.
Referenced by AxiEthernetSgDmaIntrExtVlanExample(), and XAxiEthernet_SetVTagMode().
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_BASEADDRESS XPAR_XAXIETHERNET_0_BASEADDR |
AXI Ethernet base address.
| #define XAXIETHERNET_EXAMPLE_H |
XAXIETHERNET EXAMPLE H.
| #define XPAR_AXI_DMA 2U |
AXI DMA device type.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetMcastExample(), and AxiEthernetSgDmaIntrExample().
| #define XPAR_AXI_FIFO 1U |
AXI FIFO device type.
Referenced by AxiEthernetFifoIntrExample(), and AxiEthernetPolledExample().
| #define XPAR_AXI_MCDMA 3U |
AXI MCDMA device type.
Referenced by AxiEthernetPingReqExample(), AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| typedef struct XAxiEthernet XAxiEthernet |
struct XAxiEthernet is the type for Axi Ethernet driver instance data.
The calling code is required to use a unique instance of this structure for every Axi Ethernet device used in the system. A reference to a structure of this type is then passed to the driver API functions.
| typedef struct XAxiEthernet_Config XAxiEthernet_Config |
Holds configuration information for an AXI Ethernet device.
| void AvbGMDiscontinuityHandler | ( | void * | CallBackRef, |
| u32 | TimestampsUncertain | ||
| ) |
is the handler which will be called if the PTP drivers.
identify a possible discontinuity in GrandMaster time.
This handler provides an example of how to handle this situation - but this function is application specific.
| [in] | CallBackRef | contains a callback reference from the driver, in. this case it is the instance pointer for the AVB driver. |
| [in] | TimestampsUncertain | - a value of 1 indicates that there is a. possible discontinuity in GrandMaster time. A value of 0 indicates that Timestamps are no longer uncertain. |
Referenced by main().
| void AxiEnthernetSetMAC | ( | char * | MacAddr, |
| u8 | ChanId | ||
| ) |
Programs the AXI Ethernet MAC address.
| [in] | MacAddr | MacAddr value. |
| [in] | ChanId | MCDMA channel identifier. |
References Swap8(), and XAE_MAC_ADDR_SIZE.
Referenced by AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPollExample(), and AxiEthernetSgDmaSingleFrameExample().
| int AxiEtherentConfigureTIPhy | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| u32 | PhyAddr | ||
| ) |
Configures a TI PHY for SGMII operation.
| [in] | AxiEthernetInstancePtr | is a pointer to the Axi Ethernet instance. |
| [in] | PhyAddr | is the PHY address on the MDIO bus. |
References TI_PHY_ADDDR, TI_PHY_CFGR2, TI_PHY_CFGR2_SGMII_AUTONEG_EN, TI_PHY_CR, TI_PHY_CR_DEVAD_DATAEN, TI_PHY_CR_DEVAD_EN, TI_PHY_CR_SGMII_EN, TI_PHY_PHYCTRL, TI_PHY_SGMIICLK_EN, TI_PHY_SGMIITYPE, XAxiEthernet_PhyRead(), and XAxiEthernet_PhyWrite().
Referenced by AxiEthernetUtilEnterLoopback().
| u32 AxiEthernetDetectPHY | ( | XAxiEthernet * | AxiEthernetInstancePtr | ) |
Detects the PHY address from MII status register contents.
Looks for a PHY that supports auto-negotiation and 10 Mbps full-duplex and half-duplex. On some older boards PHY address 0 may not respond, but 0 is used as the default when no other address responds.
| [in] | AxiEthernetInstancePtr | is a pointer to the Axi Ethernet instance. |
References PHY_DETECT_MASK, PHY_DETECT_REG, and XAxiEthernet_PhyRead().
Referenced by AxiEthernetUtilEnterLoopback().
| int AxiEthernetExtVlanExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending.
and receiving frames in interrupt driven SGDMA mode.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXIDMA. component. |
| [in] | AxiEthernetBaseAddress | is the base address of the AxiEthernet device. |
In XSCT/classic flow, DeviceId is used to look up the device configuration.
References XAxiEthernet_Config::AxiDevBaseAddress, AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, BD_ALIGNMENT, XAxiEthernet::Config, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, RXBD_CNT, TXBD_CNT, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOperatingSpeed(), XAxiEthernet_Stop(), and XPAR_AXI_DMA.
| int AxiEthernetFifoIntrExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XLlFifo * | FifoInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
Demonstrates AXI Ethernet usage by sending and receiving frames in.
interrupt-driven FIFO mode.
| [in] | AxiEthernetInstancePtr | is a pointer to the AXI Ethernet instance. |
| [in] | FifoInstancePtr | is a pointer to the AXI FIFO instance. |
| [in] | AxiEthernetBaseAddress | is the AXI Ethernet base address. |
References XAxiEthernet_Config::AxiDevBaseAddress, AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AxiEthernetMultipleFramesIntrExample(), AxiEthernetResetDevice(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOperatingSpeed(), XAxiEthernet_Stop(), and XPAR_AXI_FIFO.
| int AxiEthernetMcastExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
Demonstrates the usage of the Axi Ethernet extended.
multicast feature. It uses AXI DMA core in interrupt mode to transfer Ethernet frames.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXIDMA. component. |
| [in] | AxiEthernetBaseAddress | contains the base address of the AxiEthernet device. |
References XAxiEthernet_Config::AxiDevBaseAddress, AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, BD_ALIGNMENT, XAxiEthernet::Config, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, RXBD_CNT, TXBD_CNT, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOperatingSpeed(), XAxiEthernet_Stop(), and XPAR_AXI_DMA.
| int AxiEthernetMultipleFramesIntrExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XLlFifo * | FifoInstancePtr | ||
| ) |
This example sends and receives a batch of frames.
Frame reception is handled. in this function and not in the callback function.
Use this method of reception when interrupt latency is important.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | FifoInstancePtr | is a pointer to the instance of the Fifo. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAE_HDR_SIZE, XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetFifoIntrExample().
| int AxiEthernetMultipleFramesPolledExample | ( | void | ) |
This example uses polled mode to queue up multiple frames in the packet.
FIFOs before sending them in a single burst. Receive packets are handled in a similar way.
References AxiEthernetPollForRxStatus(), AxiEthernetPollForTxStatus(), AxiEthernetResetDevice(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAE_HDR_SIZE, XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetPolledExample().
| void AxiEthernetPHYRegistersDump | ( | XAxiEthernet * | AxiEthernetInstancePtr | ) |
Prints PHY register values for debugging.
| [in] | AxiEthernetInstancePtr | Pointer to the AXI Ethernet driver instance. |
| int AxiEthernetPingReqExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
The entry point for the AxiEthernet driver to ping request example in polled.
mode. generate specified number of request packets as defined in "NUM_OF_PING_REQ_PKTS.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXI MCDMA. component. |
| [in] | AxiEthernetBaseAddress | contains the base address of the AxiEthernet device. |
References XAxiEthernet_Config::AxiDevBaseAddress, XAxiEthernet_Config::BaseAddress, DELAY, XAxiEthernet_Config::Enable_1588, NUM_OF_PING_REQ_PKTS, NUM_PACK_CHECK_RX_PACK, NUM_RX_PACK_CHECK_REQ, PhySetup(), ProcessRecvFrame(), RxSetup(), SendArpReqFrame(), SendEchoReqFrame(), XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEnet_Recv(), XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XPAR_AXI_MCDMA.
| int AxiEthernetPolledExample | ( | u16 | AxiEthernetDeviceId, |
| u16 | FifoDeviceId | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving frames in polled mode.
| [in] | AxiEthernetDeviceId | is device ID of the AxiEthernet Device , typically XPAR_<AXIETHERNET_instance>_DEVICE_ID value from xparameters.h |
| [in] | FifoDeviceId | is device ID of the Fifo device taken from xparameters.h |
References XAxiEthernet_Config::AxiDevBaseAddress, AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AxiEthernetMultipleFramesPolledExample(), AxiEthernetSingleFramePolledExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOperatingSpeed(), and XPAR_AXI_FIFO.
| int AxiEthernetPollForRxStatus | ( | void | ) |
Polls the Rx status and waits for an indication that a frame has arrived or a receive related error has occurred.
If an error is reported, it handles all the possible error conditions.
References AxiEthernetResetDevice(), AxiEthernetUtilErrorTrap(), XAE_INT_RXFIFOOVR_MASK, and XAE_INT_RXRJECT_MASK.
Referenced by AxiEthernetMultipleFramesPolledExample(), and AxiEthernetSingleFramePolledExample().
| int AxiEthernetPollForTxStatus | ( | void | ) |
Polls the Tx status and waits for an indication that a frame has been transmitted successfully or a transmit related error has occurred.
If an error is reported, it handles all the possible error conditions.
References AxiEthernetResetDevice(), and AxiEthernetUtilErrorTrap().
Referenced by AxiEthernetMultipleFramesPolledExample(), and AxiEthernetSingleFramePolledExample().
| int AxiEthernetResetDevice | ( | void | ) |
Resets the device but preserves the options set by the user.
References AxiEthernetUtilErrorTrap(), XAxiEthernet_ClearOptions(), XAxiEthernet_GetMacAddress(), XAxiEthernet_GetOptions(), XAxiEthernet_Reset(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), and XAxiEthernet_Stop().
Referenced by AxiEthernetFifoIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetPollForRxStatus(), and AxiEthernetPollForTxStatus().
| int AxiEthernetSgDmaFullChecksumOffloadExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
This example sends and receives a single packet in loopback mode with.
full checksum offloading support.
An Ethernet frame is formed with IP header, TCP header and payload. The hardware calculates the IP Header checksum and populates it at the appropriate location in the IP header. Similarly, the hardware calculates the TCP Pseudo header from IP header and calculates TCP checksum for TCP Pseudo header, TCP header and TCP payload. It then populates the checksum in the TCP header. The Ethernet frame is then looped back and received. The hardware validates the IP header checksum and the TCP checksum. The example retrieves the checksum validation information from the AXI4- Stream Appword2.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
full checksum offloading support.
An Ethernet frame is formed with IP header, TCP header and payload. The hardware calculates the IP Header checksum and populates it at the appropriate location in the IP header. Similarly, the hardware calculates the TCP Pseudo header from IP header and calculates TCP checksum for TCP Pseudo header, TCP header and TCP payload. It then populates the checksum in the TCP header. The Ethernet frame is then looped back and received. The hardware validates the IP header checksum and the TCP checksum. The example retrieves the checksum validation information from the AXI4- Stream Appword2.
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameSetPayloadData(), BD_USR0_OFFSET, DUMMY_TCP_PORT_1, DUMMY_TCP_PORT_2, FULL_CSUM_ENABLE, FULL_CSUM_STATUS_MASK, FULL_CSUM_VALIDATED, IP_CSUM_OK_TCP_NOT_CHECKED, IP_CSUM_OK_TCP_NOT_OK, IP_HEADER_LEN_IN_WORDS, IP_HEADER_LENGTH, IP_HEADER_PROTOCOL_TCP, IP_HEADER_VERSION, IP_TCP_CSUMS_NOT_CHECKED, IP_VERSION_4, TCP_CSUM_NOT_CHECKED_IP_NOT_OK, TCP_HEADER_LEN_IN_WORDS, TCP_HEADER_LENGTH, XAE_HDR_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| int AxiEthernetSgDmaFullChecksumOffloadExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr | ||
| ) |
This example sends and receives a single packet in loopback mode with.
full checksum offloading support.
An Ethernet frame is formed with IP header, TCP header and payload. The hardware calculates the IP Header checksum and populates it at the appropriate location in the IP header. Similarly, the hardware calculates the TCP Pseudo header from IP header and calculates TCP checksum for TCP Pseudo header, TCP header and TCP payload. It then populates the checksum in the TCP header. The Ethernet frame is then looped back and received. The hardware validates the IP header checksum and the TCP checksum. The example retrieves the checksum validation information from the AXI4- Stream Appword2.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameSetPayloadData(), BD_USR0_OFFSET, DUMMY_TCP_PORT_1, DUMMY_TCP_PORT_2, FULL_CSUM_ENABLE, FULL_CSUM_STATUS_MASK, FULL_CSUM_VALIDATED, IP_CSUM_OK_TCP_NOT_CHECKED, IP_CSUM_OK_TCP_NOT_OK, IP_HEADER_LEN_IN_WORDS, IP_HEADER_LENGTH, IP_HEADER_PROTOCOL_TCP, IP_HEADER_VERSION, IP_TCP_CSUMS_NOT_CHECKED, IP_VERSION_4, TCP_CSUM_NOT_CHECKED_IP_NOT_OK, TCP_HEADER_LEN_IN_WORDS, TCP_HEADER_LENGTH, XAE_HDR_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_MAX_JUMBO_FRAME_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
| int AxiEthernetSgDmaIntrCoalescingExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr | ||
| ) |
This example sends frames with the interrupt coalescing settings altered.
from their defaults.
The default settings will interrupt the processor after every frame has been sent. This example will increase the threshold resulting in lower CPU utilization since it spends less time servicing interrupts.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameSetPayloadData(), XAE_HDR_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_ClearOptions(), XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaIntrExample().
| int AxiEthernetSgDmaIntrExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending.
and receiving frames in interrupt driven MCDMA mode.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXI MCDMA. component. |
| [in] | AxiEthernetBaseAddress | contains the base address of the AxiEthernet device. |
References XAxiEthernet_Config::AxiDevBaseAddress, AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AXIETHERNET_LOOPBACK_SPEED_2p5G, AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, BLOCK_SIZE_2MB, XAxiEthernet::Config, XAxiEthernet_Config::Enable_1588, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, RXBD_CNT, XAxiEthernet_Config::Speed, TXBD_CNT, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetOperatingSpeed(), XAxiEthernet_Stop(), and XPAR_AXI_MCDMA.
| int AxiEthernetSgDmaIntrExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending.
and receiving frames in interrupt driven SGDMA mode.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXIDMA. component. |
| [in] | AxiEthernetBaseAddress | contains the base address of the AxiEthernet device. |
References XAxiEthernet_Config::AxiDevBaseAddress, AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, BD_ALIGNMENT, XAxiEthernet::Config, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, RXBD_CNT, TXBD_CNT, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOperatingSpeed(), XAxiEthernet_Stop(), and XPAR_AXI_DMA.
| int AxiEthernetSgDmaIntrExtMulticastExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr | ||
| ) |
This example sends and receives a single packet in loopback mode with.
extended multicast address support.
The transmit frame will be addressed one of programmed multicast addresses.
On receive, HW should pass the frame to receive interrupt handler for further address checking.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXI DMA. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAxiEthernet::Options, PAYLOAD_SIZE, XAE_BD_RX_USR2_IP_MCAST_MASK, XAE_DEFAULT_OPTIONS, XAE_EXT_MULTICAST_OPTION, XAE_HDR_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_AddExtMulticastGroup(), XAxiEthernet_ClearOptions(), XAxiEthernet_GetExtMulticastGroup(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), and XAxiEthernet_Start().
Referenced by AxiEthernetMcastExample().
| int AxiEthernetSgDmaIntrExtVlanExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr | ||
| ) |
This example sends and receives a single packet in loopback mode with.
extended VLAN support.
The transmit frame will have VLAN field populated.
On receive, HW should pass the VLAN field to receive BDs.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
Frame setup with Tpid1+Cfi1+TxPid => 0x88A83111 Frame translated to TxTransVid => 0x88A83222 Frame tagged to Tpid2+Cfi2+TxTagVid => 0x9100C333 + 0x88A83222 Frame sent and loopbacked.
Frame stripped with RxStrpVid(0x333) => 0x88A83222 Frame translated (key:RxVid:0x222) RxTransVid => 0x88A83444
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrVlanFormatType(), AxiEthernetUtilFrameHdrVlanFormatVid(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetVlanPayloadData(), AxiEthernetUtilFrameVerify(), BD_VLAN_TPID_OFFSET, BD_VLAN_VID_OFFSET, PAYLOAD_SIZE, TPID_MASK, XAE_EXT_RXVLAN_STRP_OPTION, XAE_EXT_RXVLAN_TRAN_OPTION, XAE_EXT_TXVLAN_TAG_OPTION, XAE_EXT_TXVLAN_TRAN_OPTION, XAE_HDR_VLAN_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_JUMBO_OPTION, XAE_RECEIVER_ENABLE_OPTION, XAE_RX, XAE_TRANSMITTER_ENABLE_OPTION, XAE_TX, XAE_VSTRP_SELECT, XAE_VTAG_SELECT, XAxiEthernet_SetOptions(), XAxiEthernet_SetTpid(), XAxiEthernet_SetVidTable(), XAxiEthernet_SetVStripMode(), XAxiEthernet_SetVTagMode(), XAxiEthernet_SetVTagValue(), and XAxiEthernet_Start().
Referenced by AxiEthernetExtVlanExample().
| int AxiEthernetSgDmaIntrMultiFrameExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving a multiple frames in MCDMA interrupt mode. Each source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
References AxiEnthernetSetMAC(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), NUM_PACKETS, PAYLOAD_SIZE, XAE_HDR_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaIntrExample().
| int AxiEthernetSgDmaIntrSingleFrameExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving a single frame in SGDMA interrupt mode. The source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
References AxiEnthernetSetMAC(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), PAYLOAD_SIZE, XAE_HDR_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaIntrExample().
| int AxiEthernetSgDmaIntrSingleFrameExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving a single frame in SGDMA interrupt mode. The source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), PAYLOAD_SIZE, XAE_HDR_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_MAX_JUMBO_FRAME_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
| int AxiEthernetSgDmaMultiFrameExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving multiple frames in using MCDMA in polled mode. Each source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the MCDMA instance. |
| [in] | ChanId | is the MCDMA Channel Id to be operate on. |
References AxiEnthernetSetMAC(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), CheckDmaResult(), CheckTxDmaResult(), NUM_PACKETS, PAYLOAD_SIZE, XAE_HDR_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaPollExample().
| int AxiEthernetSgDmaPartialChecksumOffloadExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
This example sends and receives a single packet in loopback mode with.
checksum offloading support.
The transmit frame will be che cksummed over the entire Ethernet payload and inserted into the last 2 bytes of the frame.
On receive, HW should calculate the Ethernet payload checksum and return a value of 0xFFFF which means the payload data was likely not corrupted.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
checksum offloading support.
The transmit frame will be che cksummed over the entire Ethernet payload and inserted into the last 2 bytes of the frame.
On receive, HW should calculate the Ethernet payload checksum and return a value of 0xFFFF which means the payload data was likely not corrupted.
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), BD_USR0_OFFSET, BD_USR1_OFFSET, BD_USR2_OFFSET, PARTIAL_CSUM_ENABLE, PAYLOAD_SIZE, RCV_FRM_NOT_CORRUPTED, TX_CS_INIT_OFFSET, XAE_HDR_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| int AxiEthernetSgDmaPartialChecksumOffloadExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XAxiDma * | DmaInstancePtr | ||
| ) |
This example sends and receives a single packet in loopback mode with.
checksum offloading support.
The transmit frame will be checksummed over the entire Ethernet payload and inserted into the last 2 bytes of the frame.
On receive, HW should calculate the Ethernet payload checksum and return a value of 0xFFFF which means the payload data was likely not corrupted.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), BD_USR0_OFFSET, BD_USR1_OFFSET, BD_USR2_OFFSET, PARTIAL_CSUM_ENABLE, PAYLOAD_SIZE, RCV_FRM_NOT_CORRUPTED, TX_CS_INIT_OFFSET, XAE_HDR_SIZE, XAE_INT_RECV_ERROR_MASK, XAE_MAX_JUMBO_FRAME_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
| int AxiEthernetSgDmaPollExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| UINTPTR | AxiEthernetBaseAddress | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending.
and receiving frames in polled MCDMA mode.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the AXI MCDMA. component. |
| [in] | AxiEthernetBaseAddress | contains the base address of the AxiEthernet device. |
References XAxiEthernet_Config::AxiDevBaseAddress, AxiEnthernetSetMAC(), AXIETHERNET_LOOPBACK_SPEED, AXIETHERNET_LOOPBACK_SPEED_1G, AXIETHERNET_LOOPBACK_SPEED_2p5G, AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, BLOCK_SIZE_2MB, XAxiEthernet::Config, XAxiEthernet_Config::Enable_1588, RXBD_CNT, XAxiEthernet_Config::Speed, Swap8(), TXBD_CNT, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, XAE_MAC_ADDR_SIZE, XAE_PHY_TYPE_MII, XAxiEthernet_CfgInitialize(), XAxiEthernet_LookupConfig(), XAxiEthernet_SetOperatingSpeed(), XAxiEthernet_Stop(), and XPAR_AXI_MCDMA.
| int AxiEthernetSgDmaSingleFrameExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving a single frame in using MCDMA in polled mode. The source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the MCDMA instance. |
| [in] | ChanId | is the MCDMA Channel Id to be operate on. |
References AxiEnthernetSetMAC(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), CheckDmaResult(), CheckTxDmaResult(), PAYLOAD_SIZE, XAE_HDR_SIZE, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetSgDmaPollExample().
| int AxiEthernetSingleFrameIntrExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XLlFifo * | FifoInstancePtr | ||
| ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving a single frame in interrupt mode.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | FifoInstancePtr | is a pointer to the instance of the Fifo. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), PAYLOAD_SIZE, XAE_HDR_SIZE, XAE_INT_RXFIFOOVR_MASK, XAE_INT_RXRJECT_MASK, XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetFifoIntrExample().
| int AxiEthernetSingleFrameNonContIntrExample | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XLlFifo * | FifoInstancePtr | ||
| ) |
This example sends a packet from non-contiguous memory locations.
The header. is stored in one area. The payload data is calculated and written to the packet FIFO one byte at a time.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. AxiEthernet component. |
| [in] | FifoInstancePtr | is a pointer to the instance of the Fifo. component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), XAE_HDR_SIZE, XAE_MTU, XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetFifoIntrExample().
| int AxiEthernetSingleFramePolledExample | ( | void | ) |
Demonstrates the usage of the Axi Ethernet by sending and.
receiving a single frame in polled mode.
References AxiEthernetPollForRxStatus(), AxiEthernetPollForTxStatus(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAE_HDR_SIZE, XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetPolledExample().
| int AxiEthernetUtilConfigureInternalPhy | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| int | Speed | ||
| ) |
Configures the internal phy for SGMII and 1000baseX modes.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the AxiEthernet component. |
| [in] | Speed | is the loopback speed 10, 100, or 1000 Mbit. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet::Config, PHY_R0_ANEG_ENABLE, PHY_R0_CTRL_REG, PHY_R0_DFT_SPD_10, PHY_R0_DFT_SPD_100, PHY_R0_DFT_SPD_1000, PHY_R0_DFT_SPD_2500, PHY_R0_ISOLATE, XAxiEthernet_Config::PhyAddr, XAE_SPEED_1000_MBPS, XAE_SPEED_100_MBPS, XAE_SPEED_10_MBPS, XAE_SPEED_2500_MBPS, XAxiEthernet_PhyRead(), and XAxiEthernet_PhyWrite().
Referenced by AxiEthernetUtilEnterLoopback().
| int AxiEthernetUtilEnterLoopback | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| int | Speed | ||
| ) |
Sets the PHY to loopback mode.
This works with the marvell PHY. common on ML40x evaluation boards.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the AxiEthernet component. |
| [in] | Speed | is the loopback speed 10, 100, or 1000 Mbit. |
References AxiEtherentConfigureTIPhy(), AXIETHERNET_PHY_DELAY_SEC, AxiEthernetDetectPHY(), AxiEthernetUtilConfigureInternalPhy(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet::Config, MARVEL_PHY_88E1111_MODEL, MARVEL_PHY_88E1116R_MODEL, PHY_MODEL_NUM_MASK, PHY_PG2_R21_CTRL_REG, PHY_R0_ANEG_ENABLE, PHY_R0_CTRL_REG, PHY_R0_DFT_SPD_10, PHY_R0_DFT_SPD_100, PHY_R0_DFT_SPD_1000, PHY_R0_DFT_SPD_2500, PHY_R0_LOOPBACK, PHY_R0_RESET, PHY_R20_DFT_SPD_10, PHY_R20_DFT_SPD_100, PHY_R20_DFT_SPD_1000, PHY_R20_EXTND_CTRL_REG, PHY_R20_RX_DLY, PHY_R22_PAGE_ADDR_REG, PHY_R27_EXTND_STS_REG, PHY_R27_MAC_CONFIG_GMII, PHY_R27_MAC_CONFIG_RGMII, PHY_R27_MAC_CONFIG_SGMII, PHY_R3_PHY_IDENT_REG, PHY_REG21_10, PHY_REG21_100, PHY_REG21_1000, XAxiEthernet_Config::PhyAddr, TI_PHY_MODEL, XAE_PHY_TYPE_1000BASE_X, XAE_PHY_TYPE_GMII, XAE_PHY_TYPE_MII, XAE_PHY_TYPE_RGMII_1_3, XAE_PHY_TYPE_RGMII_2_0, XAE_PHY_TYPE_SGMII, XAE_SPEED_1000_MBPS, XAE_SPEED_100_MBPS, XAE_SPEED_10_MBPS, XAE_SPEED_2500_MBPS, XAxiEthernet_PhyRead(), and XAxiEthernet_PhyWrite().
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| void AxiEthernetUtilErrorTrap | ( | char * | Message | ) |
Called by example code when an error is detected.
It. can be set as a breakpoint with a debugger or it can be used to print out the given message if there is a UART or STDIO device.
| [in] | Message | is the text explaining the error |
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetPolledExample(), AxiEthernetPollForRxStatus(), AxiEthernetPollForTxStatus(), AxiEthernetResetDevice(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaPollExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), AxiEthernetSingleFramePolledExample(), AxiEthernetUtilConfigureInternalPhy(), and AxiEthernetUtilEnterLoopback().
| void AxiEthernetUtilFrameHdrFormatMAC | ( | EthernetFrame * | FramePtr, |
| char * | DestAddr | ||
| ) |
Formats an Ethernet frame header with the destination MAC address.
Set the MAC addresses in the frame.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
| [in] | DestAddr | Destination MAC address. |
References XAE_MAC_ADDR_SIZE.
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), and AxiEthernetSingleFramePolledExample().
| void AxiEthernetUtilFrameHdrFormatType | ( | EthernetFrame * | FramePtr, |
| u16 | FrameType | ||
| ) |
Formats an Ethernet frame header with the EtherType value.
Set the frame type for the specified frame.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
| [in] | FrameType | EtherType value to write into the frame header. |
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), and AxiEthernetSingleFramePolledExample().
| void AxiEthernetUtilFrameHdrVlanFormatType | ( | EthernetFrame * | FramePtr, |
| u16 | FrameType, | ||
| u32 | VlanNumber | ||
| ) |
Formats a VLAN Ethernet frame header with the EtherType value.
Set the frame type for the specified frame.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
| [in] | FrameType | EtherType value to write into the frame header. |
| [in] | VlanNumber | VLAN header index. |
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| void AxiEthernetUtilFrameHdrVlanFormatVid | ( | EthernetFrame * | FramePtr, |
| u32 | VlanNumber, | ||
| u32 | Vid | ||
| ) |
Formats a VLAN Ethernet frame header with the VLAN ID.
Set the frame VLAN info for the specified frame.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
| [in] | VlanNumber | VLAN header index. |
| [in] | Vid | VLAN identifier. |
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| void AxiEthernetUtilFrameMemClear | ( | EthernetFrame * | FramePtr | ) |
Clears an Ethernet frame buffer.
Sets all bytes of a frame to 0.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), and AxiEthernetSingleFramePolledExample().
| void AxiEthernetUtilFrameSetPayloadData | ( | EthernetFrame * | FramePtr, |
| int | PayloadSize | ||
| ) |
Fills an Ethernet frame payload with test data.
Places a pattern in the payload section of a frame.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
| [in] | PayloadSize | Number of payload bytes to write. |
The pattern. is a 8 bit incrementing series of numbers starting with 0. Once the pattern reaches 256, then the pattern changes to a 16 bit incrementing pattern:
0, 1, 2, ... 254, 255, 00, 00, 00, 01, 00, 02, ...
References XAE_HDR_SIZE.
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), and AxiEthernetSingleFramePolledExample().
| void AxiEthernetUtilFrameSetVlanPayloadData | ( | EthernetFrame * | FramePtr, |
| int | PayloadSize, | ||
| u32 | VlanNumber | ||
| ) |
Fills a VLAN Ethernet frame payload with test data.
Places a pattern in the payload section of a frame.
| [in] | FramePtr | Pointer to the Ethernet frame buffer. |
| [in] | PayloadSize | Number of payload bytes to write. |
| [in] | VlanNumber | VLAN header index. |
The pattern. is a 8 bit incrementing series of numbers starting with 0. Once the pattern reaches 256, then the pattern changes to a 16 bit incrementing pattern:
0, 1, 2, ... 254, 255, 00, 00, 00, 01, 00, 02, ...
References XAE_HDR_SIZE.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| int AxiEthernetUtilFrameVerify | ( | EthernetFrame * | CheckFrame, |
| EthernetFrame * | ActualFrame | ||
| ) |
Verifies that two Ethernet frames contain the same data.
Verifies the frame data against a CheckFrame.
| [in] | CheckFrame | Pointer to the expected Ethernet frame. |
| [in] | ActualFrame | Pointer to the received Ethernet frame. |
Validation occurs by comparing the ActualFrame to the header of the CheckFrame. If the headers match, then the payload of ActualFrame is verified for the same pattern Util_FrameSetPayloadData() generates.
References XAE_HDR_SIZE.
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrSingleFrameExample(), and AxiEthernetSingleFramePolledExample().
| void AxiEthernetUtilPhyDelay | ( | unsigned int | Seconds | ) |
Delays for the specified number of seconds while PHY hardware recovers.
For MicroBlaze, uses an assembly loop. On other platforms, uses sleep().
| [in] | Seconds | is the number of seconds to delay. |
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaPollExample(), AxiEthernetUtilConfigureInternalPhy(), and AxiEthernetUtilEnterLoopback().
| void AxiEthernetUtilSetupUart | ( | void | ) |
Configures the UART used by the example.
| int CheckDmaResult | ( | XMcdma * | InstancePtr | ) |
Checks the receive DMA completion result.
| [in] | InstancePtr | Pointer to the driver instance. |
Referenced by AxiEthernetSgDmaMultiFrameExample(), and AxiEthernetSgDmaSingleFrameExample().
| int CheckTxDmaResult | ( | XMcdma * | InstancePtr | ) |
Checks the transmit DMA completion result.
| [in] | InstancePtr | Pointer to the driver instance. |
Referenced by AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaSingleFrameExample(), SendArpReqFrame(), and SendEchoReqFrame().
| int GetBufAddr | ( | ) |
Returns a transmit buffer address for the channel.
References ICMP_PKT_SIZE.
Referenced by SendArpReqFrame(), and SendEchoReqFrame().
| int GetRxBufAddr | ( | ) |
Returns a receive buffer address for the channel.
References XAE_JUMBO_MTU.
Referenced by ProcessRecvFrame().
| int main | ( | void | ) |
Main entry point for the AVB example.
Main entry point of the Ping Request example in polled mode.
Main entry point for the Axi Ethernet example.
This function is not included if the example is generated from the TestAppGen test tool.
This function is not included if the example is generated from the TestAppGen test tool.
References AvbGMDiscontinuityHandler(), AXIETHERNET_DEVICE_ID, XAvb_Config::BaseAddress, XAxiEthernet_Config::BaseAddress, XAvb_PortIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb::Config, XAvb_Config::DeviceId, ETH_SYSTEM_ADDRESS_EUI48_HIGH, ETH_SYSTEM_ADDRESS_EUI48_LOW, XAvb_PortIdentity::PortNumber, XAvb_CfgInitialize(), XAVB_PTP_TX_PKT_SA_LOWER_OFFSET, XAVB_PTP_TX_PKT_SA_UPPER_OFFSET, XAvb_ReorderWord(), XAvb_Reset(), XAvb_SetGMDiscontinuityHandler(), XAvb_SetupSourcePortIdentity(), XAvb_Start(), XAvb_WriteToMultipleTxPtpFrames(), XAxiEthernet_CfgInitialize(), and XAxiEthernet_LookupConfig().
| int PhySetup | ( | XAxiEthernet * | AxiEthernetInstancePtr | ) |
Sets up the PHY for the ping example.
| [in] | AxiEthernetInstancePtr | Pointer to the AXI Ethernet driver instance. |
References XAxiEthernet::Config, PHY_R0_ANEG_ENABLE, PHY_R0_CTRL_REG, PHY_R0_DFT_SPD_1000, PHY_R0_ISOLATE, XAxiEthernet_Config::PhyAddr, XAxiEthernet_PhyRead(), and XAxiEthernet_PhyWrite().
Referenced by AxiEthernetPingReqExample().
| int ProcessRecvFrame | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
process the received packet.
Sends. the echo request packet based on the ARP reply packet.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
References ARP_REPLY, ARP_REQ_SRC_IP_LOC, ARP_REQ_STATUS_LOC, CORRECT_CHECKSUM_VALUE, ECHO_REPLY, ETHER_PROTO_TYPE_LOC, GetRxBufAddr(), ICMP_DATA_FIELD_LEN, ICMP_DATA_START_LOC, ICMP_ECHO_FIELD_LOC, ICMP_IDEN_FIELD_LOC, ICMP_KNOWN_DATA_LEN, ICMP_KNOWN_DATA_LOC, ICMP_SEQ_NO_LOC, IDEN_NUM, IP_ADDR_LEN, MAC_ADDR_LEN, NUM_OF_PING_REQ_PKTS, SendEchoReqFrame(), SRC_MAC_ADDR_LOC, XAE_ETHER_PROTO_TYPE_ARP, and XAE_ETHER_PROTO_TYPE_IP.
Referenced by AxiEthernetPingReqExample().
| int RxSetup | ( | XMcdma * | McDmaInstPtr, |
| XAxiEthernet * | AxiEthernetInstancePtr, | ||
| u8 | ChanId, | ||
| u32 | NumPkts | ||
| ) |
Sets up receive path resources for the example.
| [in] | McDmaInstPtr | Pointer to the MCDMA driver instance. |
| [in] | AxiEthernetInstancePtr | Pointer to the AXI Ethernet driver instance. |
| [in] | ChanId | MCDMA channel identifier. |
| [in] | NumPkts | Number of packets to process. |
References XAE_JUMBO_MTU.
Referenced by AxiEthernetPingReqExample().
| void SendArpReqFrame | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
send a ARP request packet.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
References ARP_REQ_PKT_SIZE, ARP_REQUEST, BROADCAST_ADDR, CheckTxDmaResult(), GetBufAddr(), HW_TYPE, IP_ADDR_LEN, IP_VERSION, MAC_ADDR_LEN, XAE_ETHER_PROTO_TYPE_ARP, XAE_ETHER_PROTO_TYPE_IP, and XAxienet_Send().
Referenced by AxiEthernetPingReqExample().
| void SendEchoReqFrame | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId | ||
| ) |
send a Echo request packet.
| [in] | AxiEthernetInstancePtr | is a pointer to the instance of the. Axi Ethernet component. |
| [in] | DmaInstancePtr | is a pointer to the instance of the Dma. component. |
| [in] | ChanId | is the MCDMA Channel number to be operate on. |
References CheckTxDmaResult(), ETHER_PROTO_TYPE_LOC, GetBufAddr(), ICMP_DATA_CHECKSUM_LOC, ICMP_DATA_FIELD_LEN, ICMP_DATA_LEN, ICMP_DATA_START_LOC, ICMP_ECHO_FIELD_LOC, ICMP_IDEN_FIELD_LOC, ICMP_KNOWN_DATA_LEN, ICMP_KNOWN_DATA_LOC, ICMP_PKT_SIZE, IDEN_NUM, IP_ADDR_LEN, IP_CHECKSUM_LOC, IP_HEADER_LEN, IP_REQ_DEST_IP_LOC, IP_REQ_SRC_IP_LOC, IP_START_LOC, MAC_ADDR_LEN, SRC_MAC_ADDR_LOC, XAE_ETHER_PROTO_TYPE_IP, and XAxienet_Send().
Referenced by AxiEthernetPingReqExample(), and ProcessRecvFrame().
| u16 Swap8 | ( | u8 | Data | ) |
Swaps bytes within an 8-byte value.
| [in] | Data | Data value. |
Referenced by AxiEnthernetSetMAC(), and AxiEthernetSgDmaPollExample().
| void XAvb_Adjust8kClock | ( | u32 | BaseAddress, |
| u32 | NewOffset | ||
| ) |
Adjusts the phase offset of the 8 kHz clock.
Adjusts the 8 kHz clock phase offset.
| [in] | BaseAddress | is the base address of the device. |
| [in] | NewOffset | is the newly calculated RTC Offset value. |
References XAVB_PERIOD_8KHZ, XAvb_ReadReg, XAVB_RTC_8K_OFFSET_OFFSET, XAVB_RTC_NANOSEC_OFFSET, and XAvb_WriteReg.
Referenced by XAvb_CalcRtcOffset().
| void XAvb_BecomeRtcMaster | ( | XAvb * | InstancePtr, |
| u8 | txAnnounceHasWon | ||
| ) |
make any adjustments needed when the node becomes the Grand.
Implements the XAvb_BecomeRtcMaster helper.
Master, including resetting the RTC to its nominal value
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | txAnnounceHasWon | indicates that this function has been called from. the function XAvb_DecodeTxAnnounceFrame(). Is this is set then this function has no need to repeat actions that have been already performed. |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb::CurrentBmc, XAvb::GMDiscCallBackRef, XAvb::GMDiscHandler, XAvb_BmcData::IAmTheRtcMaster, XAVB_PTP_TX_ANNOUNCE_OFFSET, XAvb_ReadAnnounceFrame(), XAVB_RTC_INCREMENT_NOMINAL_RATE, XAVB_RTC_INCREMENT_OFFSET, XAvb_UpdateBmcRecords(), and XAvb_WriteReg.
Referenced by XAvb_DecodeTxAnnounceFrame(), XAvb_PtpTimerInterruptHandler(), and XAvb_Reset().
| void XAvb_BecomeRtcSlave | ( | XAvb * | InstancePtr | ) |
make any adjustments needed when the node becomes a PTP slave.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
References XAvb_Counters::CounterSyncInterval, XAvb::CurrentBmc, XAvb::GMDiscCallBackRef, XAvb::GMDiscHandler, XAvb_BmcData::IAmTheRtcMaster, and XAvb::PtpCounters.
Referenced by XAvb_DecodeRxAnnounceFrame().
| u32 XAvb_BestMasterClockAlgorithm | ( | XAvb_BmcData * | AnnounceFrame, |
| XAvb_BmcData * | CurrentBmc | ||
| ) |
accept the data pointer to the current BMCA records, accept.
a pointer to an equivalent data structure for the new Announce Packet. The Best Master Clock Algorithm (BMCA) is then performed on these two data structures by comparing the data fields
| [in] | CurrentBmc | is a pointer to a suitable data structure, designed to. record the current fields from the current Grand Master's Announce Packet. |
| [in] | AnnounceFrame | is a pointer to a suitable data structure, designed to. record the useful fields from the received Announce Packet |
References XAvb_ClockQuality::clockAccuracy, XAvb_ClockQuality::clockClass, XAvb_PortIdentity::ClockIdentityLower, XAvb_ClockIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb_ClockIdentity::ClockIdentityUpper, XAvb_BmcData::ClockQuality, XAvb_BmcData::GrandmasterIdentity, XAvb_BmcData::GrandmasterPriority1, XAvb_BmcData::GrandmasterPriority2, XAvb_ClockQuality::offsetScaledLogVariance, XAvb_PortIdentity::PortNumber, XAvb_BmcData::SourcePortIdentity, and XAvb_BmcData::stepsRemoved.
Referenced by XAvb_DecodeRxAnnounceFrame(), and XAvb_DecodeTxAnnounceFrame().
| void XAvb_CalcDelay | ( | XAvb * | InstancePtr | ) |
Measures the link delay of the local full-duplex Ethernet link.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
References XAvb_PtpStruct::LinkDelay, XAvb_PtpStruct::PDelayTimestampT1, XAvb_PtpStruct::PDelayTimestampT2, XAvb_PtpStruct::PDelayTimestampT3, XAvb_PtpStruct::PDelayTimestampT4, XAvb::PtpRecords, XAvb_ChangePeerASCapability(), XAVB_NEIGHBOR_PROP_DELAY_THRESH, and XAVB_ONE_SECOND.
Referenced by XAvb_DecodeRxPDelayRespFollowUp().
| void XAvb_CalcRtcOffset | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
Calculates the slave RTC offset from the grandmaster time.
| [in] | InstancePtr | is a pointer to the XAvb instance. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce packet. in the Rx PTP packet buffer. |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_PtpStruct::LinkDelay, XAvb_PtpStruct::MasterCorrectionField, XAvb_RtcFormat::NanoSeconds, XAvb_PtpStruct::NewMasterTime, XAvb_PtpStruct::NewSlaveTime, XAvb::PtpRecords, XAvb_RtcFormat::SecondsLower, XAvb_RtcFormat::SecondsUpper, XAvb_PtpStruct::SlaveSyncTimestamp, XAvb_Adjust8kClock(), XAvb_CaptureNanoSec(), XAVB_ONE_SECOND, XAVB_PTP_RX_PKT_TIMESTAMP_MID_OFFSET, XAVB_PTP_RX_PKT_TIMESTAMP_UPPER_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReadReg, XAvb_ReadRtc(), XAvb_ReorderWord(), XAVB_RTC_NANOSEC_OFFSET, XAVB_RTC_SEC_LOWER_VALUE_OFFSET, and XAvb_WriteRtcOffset().
Referenced by XAvb_DecodeRxFollowUp().
| u32 XAvb_CaptureNanoSec | ( | u32 | BaseAddress, |
| u32 | PtpFrameBaseAddr | ||
| ) |
Captures the nanosecond timestamp field from a received PTP frame.
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
References XAVB_PTP_RX_PKT_TIMESTAMP_LOWER_OFFSET, XAVB_PTP_RX_PKT_TIMESTAMP_MID_OFFSET, XAvb_ReadPtpBuffer, and XAvb_ReorderWord().
Referenced by XAvb_CalcRtcOffset(), XAvb_DecodeRxPDelayResp(), and XAvb_DecodeRxPDelayRespFollowUp().
| XStatus XAvb_CfgInitialize | ( | XAvb * | InstancePtr, |
| XAvb_Config * | ConfigPtr, | ||
| u32 | EffectiveAddress | ||
| ) |
A function to initialise variables in the data structure records.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | ConfigPtr | is the Configuration Pointer. |
| [in] | EffectiveAddress | is the base address of the Configuration Pointer. |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb::GMDiscHandler, and XAvb::IsReady.
Referenced by main().
| void XAvb_ChangePeerASCapability | ( | XAvb * | InstancePtr, |
| u8 | capable | ||
| ) |
Operations needed when the peer's AS capability changes.
Implements the XAvb_ChangePeerASCapability helper.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | capable | is 1 if the peer is ASCapable, 0 otherwise. |
References XAvb::PeerASCapable.
Referenced by XAvb_CalcDelay(), XAvb_ChangePTPLockStatus(), XAvb_DecodeRxPDelayResp(), XAvb_PtpTimerInterruptHandler(), XAvb_Reset(), and XAvb_Start().
| void XAvb_ChangePTPLockStatus | ( | XAvb * | InstancePtr, |
| u8 | locked | ||
| ) |
Operations needed when PTP locks or unlocks.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | locked | is 1 if changing to locked status, zero if unlocked. |
References XAvb::GMDiscCallBackRef, XAvb::GMDiscHandler, XAvb::PTPLocked, and XAvb_ChangePeerASCapability().
Referenced by XAvb_UpdateRtcIncrement().
| u32 XAvb_CompareClockIdentity | ( | u32 | BaseAddress, |
| XAvb_ClockIdentity | Identity1, | ||
| XAvb_ClockIdentity | Identity2 | ||
| ) |
A function to compare two ClockIdentity values.
| [in] | BaseAddress | is the base address of the device. |
| [in] | Identity1 | is the first ClockIdentity to be compared. |
| [in] | Identity2 | is the second ClockIdentity to be compared. |
References XAvb_ClockIdentity::ClockIdentityLower, and XAvb_ClockIdentity::ClockIdentityUpper.
Referenced by XAvb_DecodeRxAnnounceFrame().
| u32 XAvb_ComparePortIdentity | ( | u32 | BaseAddress, |
| XAvb_PortIdentity | Identity1, | ||
| XAvb_PortIdentity | Identity2 | ||
| ) |
A function to compare two PortIdentity values.
Implements the XAvb_ComparePortIdentity helper.
| [in] | BaseAddress | is the base address of the device. |
| [in] | Identity1 | is the first sourcePortIdentity to be compared. |
| [in] | Identity2 | is the second sourcePortIdentity to be compared. |
References XAvb_PortIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, and XAvb_PortIdentity::PortNumber.
Referenced by XAvb_DecodeRxAnnounceFrame(), XAvb_DecodeRxFollowUp(), XAvb_DecodeRxPDelayResp(), XAvb_DecodeRxPDelayRespFollowUp(), and XAvb_DecodeRxSync().
| char XAvb_ConvertDurationToLogMean | ( | u16 | fractionalVal | ) |
A function to convert a fraction of 128 value that is compatible with.
Signalling data into a logMean (power of 2) value;
| [in] | fractionalVal | is the Signalling data value that is to be converted. |
Referenced by XAvb_UpdateLogMeanMessageInterval().
| u16 XAvb_ConvertLogMeanToDuration | ( | char | logMeanVal | ) |
A function to convert a logMean (power of 2) value into a fraction of 128.
Implements the XAvb_ConvertLogMeanToDuration helper.
that is compatible with Signalling data.
| [in] | logMeanVal | is the base2 value that is to be converted. |
Referenced by XAvb_DecodeRxAnnounceFrame(), XAvb_DecodeRxSync(), XAvb_Reset(), and XAvb_UpdateIntervalDuration().
| void XAvb_DecodeRxAnnounceFrame | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A New Announce Packet has been received.
We need to decode it and rerun the. Best Master Clock Algorithm (BMCA)
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
an updated True/False decision as to whether this device should operate as a clock master or a slave is written into the CurrentBmc data structure.
References XAvb_BmcData::AnnounceIntervalDuration, XAvb_Config::BaseAddress, XAvb_ClockQuality::clockClass, XAvb_ClockIdentity::ClockIdentityLower, XAvb_ClockIdentity::ClockIdentityUpper, XAvb_BmcData::ClockQuality, XAvb::Config, XAvb_Counters::CounterAnnounceInterval, XAvb::CurrentBmc, XAvb_BmcData::GrandmasterIdentity, XAvb_BmcData::GrandmasterPriority1, XAvb_BmcData::GrandmasterPriority2, XAvb_BmcData::IAmTheRtcMaster, XAvb_BmcData::logMessageInterval, XAvb::portIdLocal, XAvb::PtpCounters, XAvb_BmcData::SourcePortIdentity, XAvb_BmcData::stepsRemoved, XAvb_BecomeRtcSlave(), XAvb_BestMasterClockAlgorithm(), XAvb_CompareClockIdentity(), XAvb_ComparePortIdentity(), XAvb_ConvertLogMeanToDuration(), XAvb_DecodeTxAnnounceFrame(), XAvb_ReadAnnounceFrame(), XAvb_ReadAnnounceReceiptTimeout(), and XAvb_UpdateBmcRecords().
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_DecodeRxFollowUp | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to decode a received PTP Follow-up Packet.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_Counters::CounterSyncEvents, XAvb::CurrentBmc, XAvb_SequenceIdStruct::FollowUpSequenceId, XAvb_BmcData::IAmTheRtcMaster, XAvb_PtpStruct::MasterCorrectionField, XAvb_PtpStruct::NewMasterTime, XAvb_PtpStruct::NewSlaveTime, XAvb_SequenceIdStruct::NewSyncSequenceId, XAvb_PtpStruct::OldMasterTime, XAvb_PtpStruct::OldSlaveTime, XAvb_SequenceIdStruct::OldSyncSequenceId, XAvb::PtpCounters, XAvb::PtpRecords, XAvb::SequenceIdRecords, XAvb_BmcData::SourcePortIdentity, XAvb_SequenceIdStruct::SyncSequenceId, XAvb_CalcRtcOffset(), XAvb_ComparePortIdentity(), XAvb_GetPortIdentity(), XAVB_NUM_SYNC_FU_PAIR_CALC_RTC_INCREMENT, XAVB_PTP_RX_PKT_CORRECTION_FIELD_OFFSET, XAVB_PTP_RX_PKT_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), and XAvb_UpdateRtcIncrement().
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_DecodeRxPDelayResp | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to decode a received PDelayResp Packet.
Implements the XAvb_DecodeRxPDelayResp helper.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_SequenceIdStruct::PDelayReqSequenceId, XAvb_SequenceIdStruct::PDelayRespSequenceId, XAvb_PtpStruct::PDelayTimestampT2, XAvb_PtpStruct::PDelayTimestampT4, XAvb::portIdLocal, XAvb::PtpRecords, XAvb_StateMachineData::rcvdPDelayResp, XAvb_StateMachineData::respPortIdentity, XAvb_StateMachineData::respReqPortIdentity, XAvb::SequenceIdRecords, XAvb::StateMachineData, XAvb_CaptureNanoSec(), XAvb_ChangePeerASCapability(), XAvb_ComparePortIdentity(), XAvb_GetPortIdentity(), XAVB_PTP_PKT_CAPTURED_TIMESTAMP_OFFSET, XAVB_PTP_RX_PKT_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_REQ_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), and XAVB_RX_MAC_LATENCY_IN_NS.
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_DecodeRxPDelayRespFollowUp | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to decode a received PDelayRespFollowUp Packet.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_SequenceIdStruct::PDelayFollowUpSequenceId, XAvb_SequenceIdStruct::PDelayRespSequenceId, XAvb_PtpStruct::PDelayTimestampT3, XAvb::PtpRecords, XAvb_StateMachineData::rcvdPDelayResp, XAvb_StateMachineData::rcvdPDelayRespFollowUp, XAvb_StateMachineData::respPortIdentity, XAvb_StateMachineData::respReqPortIdentity, XAvb::SequenceIdRecords, XAvb::StateMachineData, XAvb_CalcDelay(), XAvb_CaptureNanoSec(), XAvb_ComparePortIdentity(), XAvb_GetPortIdentity(), XAVB_PTP_RX_PKT_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_REQ_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, and XAvb_ReorderWord().
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_DecodeRxSignaling | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to decode a received Signalling Packet and modify the TX PTP.
Implements the XAvb_DecodeRxSignaling helper.
Buffers based on the requested values.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Signaling Packet. in the Rx PTP Packet Buffer |
References XAvb_SignallingFrameData::AnnounceIntervalDuration, XAvb_Config::BaseAddress, XAvb::Config, XAvb_SignallingFrameData::LinkDelayIntervalDuration, XAvb::SignallingFrameData, XAvb_SignallingFrameData::SyncIntervalDuration, XAVB_DEFAULT_LOG_MEAN_ANNOUNCE_INTERVAL, XAVB_DEFAULT_LOG_MEAN_PDELAY_REQ_INTERVAL, XAVB_DEFAULT_LOG_MEAN_SYNC_INTERVAL, XAVB_PKT_TYPE_DISABLED, XAVB_PTP_RX_PKT_SIGNALING_DELAY_INTERVAL_OFFSET, XAVB_PTP_TX_ANNOUNCE_OFFSET, XAVB_PTP_TX_FOLLOW_UP_OFFSET, XAVB_PTP_TX_PDELAYREQ_OFFSET, XAVB_PTP_TX_SYNC_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), XAvb_UpdateIntervalDuration(), and XAvb_UpdateLogMeanMessageInterval().
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_DecodeRxSync | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to decode a received PTP Sync Packet.
Implements the XAvb_DecodeRxSync helper.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
References XAvb_Config::BaseAddress, XAvb_PortIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb::Config, XAvb_Counters::CounterSyncInterval, XAvb::CurrentBmc, XAvb_BmcData::IAmTheRtcMaster, XAvb::latestMDSyncReceive, XAvb_MDSyncReceive::logMessageInterval, XAvb_PortIdentity::PortNumber, XAvb::PtpCounters, XAvb::PtpRecords, XAvb::SequenceIdRecords, XAvb_PtpStruct::SlaveSyncTimestamp, XAvb_BmcData::SourcePortIdentity, XAvb_MDSyncReceive::SyncIntervalDuration, XAvb_SequenceIdStruct::SyncSequenceId, XAvb_ComparePortIdentity(), XAvb_ConvertLogMeanToDuration(), XAvb_GetPortIdentity(), XAVB_PTP_PKT_CAPTURED_TIMESTAMP_OFFSET, XAVB_PTP_RX_PKT_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), and XAVB_RX_MAC_LATENCY_IN_NS.
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_DecodeTxAnnounceFrame | ( | XAvb * | InstancePtr | ) |
A New Announce Packet has been written to this device to transmit.
Implements the XAvb_DecodeTxAnnounceFrame helper.
We need to. decode it and rerun the Best Master Clock Algorithm (BMCA)
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
an updated True/False decision as to whether this device should operate as a clock master or a slave is written into the CurrentBmc data structure.
References XAvb_Config::BaseAddress, XAvb_ClockQuality::clockClass, XAvb_ClockIdentity::ClockIdentityLower, XAvb_ClockIdentity::ClockIdentityUpper, XAvb_BmcData::ClockQuality, XAvb::Config, XAvb::CurrentBmc, XAvb_BmcData::GrandmasterIdentity, XAvb_BmcData::GrandmasterPriority1, XAvb_BmcData::GrandmasterPriority2, XAvb_BmcData::IAmTheRtcMaster, XAvb_BecomeRtcMaster(), XAvb_BestMasterClockAlgorithm(), XAVB_PTP_TX_ANNOUNCE_OFFSET, XAvb_ReadAnnounceFrame(), and XAvb_UpdateBmcRecords().
Referenced by XAvb_DecodeRxAnnounceFrame(), and XAvb_Start().
| void XAvb_GetPortIdentity | ( | u32 | BaseAddress, |
| u32 | PtpFrameBaseAddr, | ||
| u32 | PortIdOffset, | ||
| XAvb_PortIdentity * | portID | ||
| ) |
A function to extract portIdentity information from a received PTP frame.
This can be any portIdentity field (header portIdentity, requestingPortIdentity, etc.)
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
| [in] | PortIdOffset | is the packet offset of the first byte of the portIdentity. field to be parsed |
| [in] | portID | is the XAvb_PortIdentity struct that the data will be written to. |
portID is updated with the portIdentity information.
References XAvb_PortIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb_PortIdentity::PortNumber, XAvb_ReadPtpBuffer, and XAvb_ReorderWord().
Referenced by XAvb_DecodeRxFollowUp(), XAvb_DecodeRxPDelayResp(), XAvb_DecodeRxPDelayRespFollowUp(), XAvb_DecodeRxSync(), and XAvb_ReadAnnounceFrame().
| u32 XAvb_IncSequenceId | ( | u32 | BaseAddress, |
| u32 | PtpFrameBaseAddress | ||
| ) |
A function to increment the sequenceId in a PTP frame template.
Implements the XAvb_IncSequenceId helper.
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFrameBaseAddress | is the base address of the TX PTP Buffer whose. SequenceID is to be incremented |
References XAVB_PTP_TX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), and XAvb_WritePtpBuffer.
Referenced by XAvb_MasterSendAnnounce(), XAvb_MasterSendSync(), and XAvb_SendPDelayReq().
| u32 XAvb_IsRxFramePTP | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to check that various fields in the received frame contain the.
expected values which define it as a valid AVB PTP frame. If this check does not pass then the frame should not be decoded and used.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
References XAvb_Config::BaseAddress, XAvb::Config, XAVB_PTP_ETHERTYPE, XAVB_PTP_RX_PKT_TYPE_OFFSET, XAVB_PTP_VERSION_PTP, XAvb_ReadPtpBuffer, and XAvb_ReorderWord().
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_MasterSendAnnounce | ( | XAvb * | InstancePtr | ) |
A function to format then request the transmission of a PTP Announce Packet.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
the relevant Tx PTP Packet Buffer is written to with the updated PTP fields, and then the Tx PTP Packet Buffer Control Register is written to request the frame transmission.
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_IncSequenceId(), XAVB_PTP_TX_ANNOUNCE_OFFSET, XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_SEND_ANNOUNCE_FRAME_MASK, XAvb_ReadReg, XAVB_RTC_NANOSEC_VALUE_OFFSET, XAVB_RTC_SEC_LOWER_VALUE_OFFSET, XAvb_WaitOnTxPtpQueue(), and XAvb_WriteReg.
Referenced by XAvb_PtpTimerInterruptHandler().
| void XAvb_MasterSendFollowUp | ( | XAvb * | InstancePtr | ) |
A function to format then request the transmission of a PTP Follow-Up Packet.
Implements the XAvb_MasterSendFollowUp helper.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
the relevant Tx PTP Packet Buffer is written to with the updated PTP fields, and then the Tx PTP Packet Buffer Control Register is written to request the frame transmission.
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_PtpStruct::Nanosec, XAvb::PtpRecords, XAVB_ONE_SECOND, XAVB_PTP_PKT_CAPTURED_TIMESTAMP_OFFSET, XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_FOLLOW_UP_OFFSET, XAVB_PTP_TX_PKT_CORRECTION_FIELD_OFFSET, XAVB_PTP_TX_SEND_FOLLOWUP_FRAME_MASK, XAVB_PTP_TX_SYNC_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReadReg, XAvb_ReorderWord(), XAVB_RTC_NANOSEC_OFFSET, XAVB_TX_MAC_LATENCY_IN_NS, XAvb_WaitOnTxPtpQueue(), XAvb_WritePtpBuffer, and XAvb_WriteReg.
Referenced by XAvb_PtpTimerInterruptHandler().
| void XAvb_MasterSendSync | ( | XAvb * | InstancePtr | ) |
A function to format then request the transmission of a PTP Sync Packet.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
the relevant Tx PTP Packet Buffer is written to with the updated PTP fields, and then the Tx PTP Packet Buffer Control Register is written to request the frame transmission.
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_PtpStruct::Nanosec, XAvb::PtpRecords, XAvb_IncSequenceId(), XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_FOLLOW_UP_OFFSET, XAVB_PTP_TX_PKT_SEQUENCEID_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_LOWER_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_MID_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_UPPER_OFFSET, XAVB_PTP_TX_SEND_SYNC_FRAME_MASK, XAVB_PTP_TX_SYNC_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReadReg, XAvb_ReorderWord(), XAVB_RTC_NANOSEC_VALUE_OFFSET, XAVB_RTC_SEC_LOWER_VALUE_OFFSET, XAVB_RTC_SEC_UPPER_VALUE_OFFSET, XAvb_WaitOnTxPtpQueue(), XAvb_WritePtpBuffer, and XAvb_WriteReg.
Referenced by XAvb_PtpTimerInterruptHandler().
| void XAvb_PtpRxInterruptHandler | ( | XAvb * | InstancePtr | ) |
The Interrupt subroutine for the "interrupt_ptp_rx" signal.
Implements the XAvb_PtpRxInterruptHandler helper.
This interrupt. fires whenever a PTP frame has been received. The main function is to identify, decode, and act on the type of PTP frame received.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb::PtpCounters, XAvb::PtpIsRunning, XAvb_Counters::RxPtpHardPointer, XAvb_Counters::RxPtpSoftPointer, XAvb_DecodeRxAnnounceFrame(), XAvb_DecodeRxFollowUp(), XAvb_DecodeRxPDelayResp(), XAvb_DecodeRxPDelayRespFollowUp(), XAvb_DecodeRxSignaling(), XAvb_DecodeRxSync(), XAvb_IsRxFramePTP(), XAVB_PTP_RX_BASE_OFFSET, XAVB_PTP_RX_CONTROL_OFFSET, XAVB_PTP_RX_PACKET_FIELD_MASK, XAVB_PTP_RX_PKT_TYPE_OFFSET, XAVB_PTP_TYPE_ANNOUNCE, XAVB_PTP_TYPE_FOLLOW_UP, XAVB_PTP_TYPE_PDELAYREQ, XAVB_PTP_TYPE_PDELAYRESP, XAVB_PTP_TYPE_PDELAYRESP_FOLLOW_UP, XAVB_PTP_TYPE_SIGNALING, XAVB_PTP_TYPE_SYNC, XAvb_ReadPtpBuffer, XAvb_ReadReg, XAvb_SendPDelayResp(), and XAvb_SendPDelayRespFollowUp().
| void XAvb_PtpTimerInterruptHandler | ( | XAvb * | InstancePtr | ) |
The Interrupt subroutine for the "interruptPtpTimer" signal.
This interrupt. fires regularly on a 1/128 second period (based on the RTC).
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
end of 'if (InstancePtr->PtpIsRunning == 1)'
References XAvb_BmcData::AnnounceIntervalDuration, XAvb_SignallingFrameData::AnnounceIntervalDuration, XAvb_Config::BaseAddress, XAvb::Config, XAvb_Counters::CounterAnnounceInterval, XAvb_Counters::CounterLinkDelayInterval, XAvb_Counters::CounterSyncInterval, XAvb::CurrentBmc, XAvb_BmcData::IAmTheRtcMaster, XAvb::latestMDSyncReceive, XAvb_SignallingFrameData::LinkDelayIntervalDuration, XAvb_StateMachineData::lostResponses, XAvb::PeerASCapable, XAvb::PtpCounters, XAvb::PtpIsRunning, XAvb_StateMachineData::rcvdPDelayResp, XAvb_StateMachineData::rcvdPDelayRespFollowUp, XAvb::SignallingFrameData, XAvb::StateMachineData, XAvb_SignallingFrameData::SyncIntervalDuration, XAvb_MDSyncReceive::SyncIntervalDuration, XAVB_ALLOWED_LOST_RESPONSES, XAVB_ANNOUNCE_RECEIPT_TIMEOUT, XAvb_BecomeRtcMaster(), XAvb_ChangePeerASCapability(), XAvb_MasterSendAnnounce(), XAvb_MasterSendFollowUp(), XAvb_MasterSendSync(), XAVB_PKT_TYPE_DISABLED, XAVB_RTC_CLEAR_INT_MASK, XAVB_RTC_CLEAR_INT_OFFSET, XAvb_SendPDelayReq(), XAVB_SYNC_RECEIPT_TIMEOUT, and XAvb_WriteReg.
| void XAvb_ReadAnnounceFrame | ( | u32 | BaseAddress, |
| u32 | PtpFrameBaseAddr, | ||
| XAvb_BmcData * | AnnounceFrame | ||
| ) |
Analyzes a new Announce packet.
Implements the XAvb_ReadAnnounceFrame helper.
read in the. packet, decode it, and extract the relevant information fields to the "AnnounceFrame" data pointer.
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
| [in] | AnnounceFrame | is a pointer to a suitable data structure, designed to. record the useful fields from the received Announce Packet |
References XAvb_ClockQuality::clockAccuracy, XAvb_ClockQuality::clockClass, XAvb_PortIdentity::ClockIdentityLower, XAvb_ClockIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb_ClockIdentity::ClockIdentityUpper, XAvb_BmcData::ClockQuality, XAvb_BmcData::GrandmasterIdentity, XAvb_BmcData::GrandmasterPriority1, XAvb_BmcData::GrandmasterPriority2, XAvb_ClockQuality::offsetScaledLogVariance, XAvb_BmcData::SourcePortIdentity, XAvb_BmcData::stepsRemoved, XAvb_GetPortIdentity(), XAVB_PTP_RX_PKT_ANNOUNCE_GMID_LOW_STEPSREMOVED_HI_OFFSET, XAVB_PTP_RX_PKT_ANNOUNCE_GMID_MID_OFFSET, XAVB_PTP_RX_PKT_ANNOUNCE_PRI1_QUAL_HI_OFFSET, XAVB_PTP_RX_PKT_ANNOUNCE_QUAL_LOW_PRI2_GMID_HI_OFFSET, XAVB_PTP_RX_PKT_ANNOUNCE_STEPSREMOVED_LOW_TIMESRC_OFFSET, XAVB_PTP_RX_PKT_PORTID_UPPER_OFFSET, XAvb_ReadPtpBuffer, and XAvb_ReorderWord().
Referenced by XAvb_BecomeRtcMaster(), XAvb_DecodeRxAnnounceFrame(), and XAvb_DecodeTxAnnounceFrame().
| void XAvb_ReadAnnounceReceiptTimeout | ( | u32 | BaseAddress, |
| u32 | PtpFrameBaseAddr, | ||
| XAvb_BmcData * | AnnounceFrame | ||
| ) |
Reads the logMessageinteval from an RX PTP Buffer and updates.
Implements the XAvb_ReadAnnounceReceiptTimeout helper.
the AnnounceFrame struct with the value read.
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
| [in] | AnnounceFrame | is a pointer to a suitable data structure, designed to. record the useful fields from the received Announce Packet |
References XAvb_BmcData::logMessageInterval, XAVB_PTP_RX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, and XAvb_ReorderWord().
Referenced by XAvb_DecodeRxAnnounceFrame().
| void XAvb_ReadRtc | ( | u32 | BaseAddress, |
| XAvb_RtcFormat * | RtcValue | ||
| ) |
Reads the current Real Time Counter (RTC) value.
| [in] | BaseAddress | is the base address of the device. |
| [in] | RtcValue | is a pointer to a struct in which to store the value read. from the RTC (The RTC 48-bit seconds field and the 32-bit ns field of this struct are updated). |
References XAvb_RtcFormat::NanoSeconds, XAvb_RtcFormat::SecondsLower, XAvb_RtcFormat::SecondsUpper, XAVB_RTC_NANOSEC_VALUE_OFFSET, XAVB_RTC_NS_MASK, XAVB_RTC_SEC_LOWER_MASK, XAVB_RTC_SEC_LOWER_VALUE_OFFSET, XAVB_RTC_SEC_UPPER_MASK, and XAVB_RTC_SEC_UPPER_VALUE_OFFSET.
Referenced by XAvb_CalcRtcOffset(), and XAvb_SendPDelayRespFollowUp().
| u32 XAvb_ReorderWord | ( | u32 | Data | ) |
Switches the bytes in a 4-byte word, swapping the MSB for the.
Implements the XAvb_ReorderWord helper.
LSB, and vice-versa.
| [in] | Data | is the 4-byte input data word. |
Referenced by main(), XAvb_CalcRtcOffset(), XAvb_CaptureNanoSec(), XAvb_DecodeRxFollowUp(), XAvb_DecodeRxPDelayResp(), XAvb_DecodeRxPDelayRespFollowUp(), XAvb_DecodeRxSignaling(), XAvb_DecodeRxSync(), XAvb_GetPortIdentity(), XAvb_IncSequenceId(), XAvb_IsRxFramePTP(), XAvb_MasterSendFollowUp(), XAvb_MasterSendSync(), XAvb_ReadAnnounceFrame(), XAvb_ReadAnnounceReceiptTimeout(), XAvb_SendPDelayReq(), XAvb_SendPDelayResp(), XAvb_SendPDelayRespFollowUp(), and XAvb_SetupSourcePortIdentity().
| void XAvb_Reset | ( | XAvb * | InstancePtr | ) |
Resets all of the AVB device driver functions to the start-up.
Implements the XAvb_Reset helper.
(reset) defaults.
| [in] | InstancePtr | is a pointer to the Xavb instance to be worked on. |
References XAvb_SignallingFrameData::AnnounceIntervalDuration, XAvb_Config::BaseAddress, XAvb::Config, XAvb_Counters::CounterAnnounceInterval, XAvb_Counters::CounterLinkDelayInterval, XAvb_Counters::CounterSyncEvents, XAvb_Counters::CounterSyncInterval, XAvb::IsReady, XAvb::latestMDSyncReceive, XAvb_PtpStruct::LinkDelay, XAvb_SignallingFrameData::LinkDelayIntervalDuration, XAvb_StateMachineData::lostResponses, XAvb::PtpCounters, XAvb::PtpIsRunning, XAvb::PtpRecords, XAvb_StateMachineData::rcvdPDelayResp, XAvb_StateMachineData::rcvdPDelayRespFollowUp, XAvb_Counters::RxPtpHardPointer, XAvb_Counters::RxPtpSoftPointer, XAvb::SignallingFrameData, XAvb::StateMachineData, XAvb_SignallingFrameData::SyncIntervalDuration, XAvb_MDSyncReceive::SyncIntervalDuration, XAvb_BecomeRtcMaster(), XAvb_ChangePeerASCapability(), XAvb_ConvertLogMeanToDuration(), XAVB_DEFAULT_LOG_MEAN_ANNOUNCE_INTERVAL, XAVB_DEFAULT_LOG_MEAN_PDELAY_REQ_INTERVAL, XAVB_DEFAULT_LOG_MEAN_SYNC_INTERVAL, XAVB_PTP_TX_ANNOUNCE_OFFSET, XAVB_PTP_TX_FOLLOW_UP_OFFSET, XAVB_PTP_TX_PDELAYREQ_OFFSET, XAVB_PTP_TX_SYNC_OFFSET, XAVB_SW_RESET_OFFSET, XAVB_SW_RESET_TX_AND_RX_PATHS, XAvb_UpdateLogMeanMessageInterval(), and XAvb_WriteReg.
Referenced by main(), and XAvb_Stop().
| void XAvb_SendPDelayReq | ( | XAvb * | InstancePtr | ) |
A function to format then request the transmission of a PTP PDelay Request.
Packet
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
the relevant Tx PTP Packet Buffer is written to with the updated PTP fields, and then the Tx PTP Packet Buffer Control Register is written to request the frame transmission.
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_SequenceIdStruct::PDelayReqSequenceId, XAvb_PtpStruct::PDelayTimestampT1, XAvb::PtpRecords, XAvb::SequenceIdRecords, XAvb_IncSequenceId(), XAVB_PTP_PKT_CAPTURED_TIMESTAMP_OFFSET, XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_PDELAYREQ_OFFSET, XAVB_PTP_TX_PKT_SEQUENCEID_OFFSET, XAVB_PTP_TX_SEND_PDELAYREQ_FRAME_MASK, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), XAVB_TX_MAC_LATENCY_IN_NS, XAvb_WaitOnTxPtpQueue(), and XAvb_WriteReg.
Referenced by XAvb_PtpTimerInterruptHandler().
| void XAvb_SendPDelayResp | ( | XAvb * | InstancePtr, |
| u32 | PtpFrameBaseAddr | ||
| ) |
A function to format then request the transmission of a PTP PDelay Response.
Packet
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | PtpFrameBaseAddr | is the base address of the received Announce Packet. in the Rx PTP Packet Buffer |
the relevant Tx PTP Packet Buffer is written to with the updated PTP fields, and then the Tx PTP Packet Buffer Control Register is written to request the frame transmission.
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_PtpStruct::NsOffsetForPDelayResp, XAvb::PtpRecords, XAVB_ONE_SECOND, XAVB_PDELAY_LOG_MEAN_MESSAGE_INT, XAVB_PTP_PKT_CAPTURED_TIMESTAMP_OFFSET, XAVB_PTP_RX_PKT_PORTID_LOWER_OFFSET, XAVB_PTP_RX_PKT_PORTID_MID_OFFSET, XAVB_PTP_RX_PKT_PORTID_UPPER_OFFSET, XAVB_PTP_RX_PKT_SEQUENCEID_OFFSET, XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_PDELAYRESP_FOLLOW_UP_OFFSET, XAVB_PTP_TX_PDELAYRESP_OFFSET, XAVB_PTP_TX_PKT_REQ_PORTID_LOWER_OFFSET, XAVB_PTP_TX_PKT_REQ_PORTID_MID_OFFSET, XAVB_PTP_TX_PKT_REQ_PORTID_UPPER_OFFSET, XAVB_PTP_TX_PKT_SEQUENCEID_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_LOWER_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_MID_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_UPPER_OFFSET, XAVB_PTP_TX_SEND_PDELAYRESP_FRAME_MASK, XAvb_ReadPtpBuffer, XAvb_ReadReg, XAvb_ReorderWord(), XAVB_RTC_NANOSEC_OFFSET, XAVB_RTC_NANOSEC_VALUE_OFFSET, XAVB_RTC_SEC_LOWER_VALUE_OFFSET, XAVB_RTC_SEC_UPPER_VALUE_OFFSET, XAVB_RX_MAC_LATENCY_IN_NS, XAvb_WaitOnTxPtpQueue(), XAvb_WritePtpBuffer, and XAvb_WriteReg.
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_SendPDelayRespFollowUp | ( | XAvb * | InstancePtr | ) |
A function to format then request the transmission of a PTP PDelay Response.
Implements the XAvb_SendPDelayRespFollowUp helper.
Follow-Up Packet
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
the relevant Tx PTP Packet Buffer is written to with the updated PTP fields, and then the Tx PTP Packet Buffer Control Register is written to request the frame transmission.
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_RtcFormat::NanoSeconds, XAvb_PtpStruct::NsOffsetForPDelayResp, XAvb::PtpRecords, XAvb_RtcFormat::SecondsLower, XAvb_RtcFormat::SecondsUpper, XAVB_ONE_SECOND, XAVB_PTP_PKT_CAPTURED_TIMESTAMP_OFFSET, XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_PDELAYRESP_FOLLOW_UP_OFFSET, XAVB_PTP_TX_PDELAYRESP_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_LOWER_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_MID_OFFSET, XAVB_PTP_TX_PKT_TIMESTAMP_UPPER_OFFSET, XAVB_PTP_TX_SEND_PDELAYRESPFOLLOWUP_FRAME_MASK, XAvb_ReadPtpBuffer, XAvb_ReadRtc(), XAvb_ReorderWord(), XAVB_TX_MAC_LATENCY_IN_NS, XAvb_WaitOnTxPtpQueue(), XAvb_WritePtpBuffer, and XAvb_WriteReg.
Referenced by XAvb_PtpRxInterruptHandler().
| void XAvb_SetGMDiscontinuityHandler | ( | XAvb * | InstancePtr, |
| XAvb_Handler | FuncPtr, | ||
| void * | CallBackRef | ||
| ) |
Sets the handler that will be called when a GM discontinuity.
event is identified by the driver. The purpose of the handler is to allow application specific processing to be performed.
| [in] | InstancePtr | is a pointer to the XAvb instance. |
| [in] | FuncPtr | is the pointer to the callback function. |
| [in] | CallBackRef | is the upper layer callback reference passed back. when the callback function is invoked. |
References XAvb::GMDiscCallBackRef, XAvb::GMDiscHandler, and XAvb::IsReady.
Referenced by main().
| void XAvb_SetupRxFilterControlMatchMode | ( | XAvb * | InstancePtr, |
| u32 | VlanMatchMode | ||
| ) |
A function to set the VLAN Match Mode field for the RX Filtering Control.
Implements the XAvb_SetupRxFilterControlMatchMode helper.
Register - such that AV traffic is correctly filtered by the RX Splitter.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | VlanMatchMode | contains the 1-bit value to be written to the register. in the correct bit position as defined in the address map |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_ReadReg, XAVB_RX_AV_VLAN_MATCH_MODE_MASK, XAVB_RX_FILTER_CONTROL, and XAvb_WriteReg.
| void XAvb_SetupRxFilterControlPcp | ( | XAvb * | InstancePtr, |
| u32 | VlanPriority, | ||
| u8 | SrClass | ||
| ) |
A function to set the VLAN PCP field for either SR A or B traffic in the.
RX Filtering Control Register - such that AV traffic is correctly filtered by the RX Splitter.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | VlanPriority | contains the 3-bit value to be written to the register. in the correct bit positions as defined in the address map |
| [in] | SrClass | is '0' if VLAN Priority (PCP) A is to be updated and is. '1' if VLAN Priority (PCP) B is to be updated |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_ReadReg, XAVB_RX_AV_VLAN_PRIORITY_A_MASK, XAVB_RX_AV_VLAN_PRIORITY_B_MASK, XAVB_RX_FILTER_CONTROL, and XAvb_WriteReg.
| void XAvb_SetupRxFilterControlVid | ( | XAvb * | InstancePtr, |
| u32 | VlanVid, | ||
| u8 | SrClass | ||
| ) |
A function to set the VLAN VID field for either SR A or B traffic in the.
Implements the XAvb_SetupRxFilterControlVid helper.
RX Filtering Control Register - such that AV traffic is correctly filtered by the RX Splitter.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | VlanVid | contains the 12-bit value to be written to the register. in the correct bit positions as defined in the address map |
| [in] | SrClass | is '0' if VLAN VID A is to be updated and is. '1' if VLAN VID B is to be updated |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_ReadReg, XAVB_RX_AV_VLAN_VID_A_MASK, XAVB_RX_AV_VLAN_VID_B_MASK, XAVB_RX_FILTER_CONTROL, and XAvb_WriteReg.
| void XAvb_SetupSourcePortIdentity | ( | XAvb * | InstancePtr, |
| XAvb_PortIdentity | systemIdentity | ||
| ) |
Updates the portIdLocal local copy of the sourcePortIdentity.
Implements the XAvb_SetupSourcePortIdentity helper.
and writes this value into the TX PTP frame buffer templates. The fields that are written are: o sourcePortIdentity for all default PTP frames o Announce:: grandmasterIdentity o Announce:: TLV clockIdentity
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
| [in] | systemIdentity | is the clockIdentity and portNumber for this endpoint. |
References XAvb_Config::BaseAddress, XAvb_PortIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb::Config, XAvb::portIdLocal, XAvb_PortIdentity::PortNumber, XAVB_PTP_TX_ANNOUNCE_OFFSET, XAVB_PTP_TX_PKT_ANNOUNCE_GMID_LOW_STEPSREMOVED_HI_OFFSET, XAVB_PTP_TX_PKT_ANNOUNCE_GMID_MID_OFFSET, XAVB_PTP_TX_PKT_ANNOUNCE_QUAL_LOW_PRI2_GMID_HI_OFFSET, XAVB_PTP_TX_PKT_ANNOUNCE_TLVLEN_PATHSEQ_START_OFFSET, XAVB_PTP_TX_PKT_PORTID_LOWER_OFFSET, XAVB_PTP_TX_PKT_PORTID_MID_OFFSET, XAVB_PTP_TX_PKT_PORTID_UPPER_OFFSET, XAvb_ReadPtpBuffer, XAvb_ReorderWord(), XAvb_WritePtpBuffer, and XAvb_WriteToMultipleTxPtpFrames().
Referenced by main().
| void XAvb_Start | ( | XAvb * | InstancePtr | ) |
start the PTP drivers running.
| [in] | InstancePtr | is a pointer to the Xavb instance to be worked on. |
References XAvb::IsReady, XAvb::PtpIsRunning, XAvb_ChangePeerASCapability(), and XAvb_DecodeTxAnnounceFrame().
Referenced by main().
| void XAvb_Stop | ( | XAvb * | InstancePtr | ) |
stop the PTP drivers from running.
| [in] | InstancePtr | is a pointer to the Xavb instance to be worked on. |
References XAvb::IsReady, and XAvb_Reset().
| void XAvb_UpdateBmcRecords | ( | XAvb_BmcData * | NewMaster, |
| XAvb_BmcData * | CurrentBmc | ||
| ) |
accept the data pointer to the current BMCA records, accept.
Implements the XAvb_UpdateBmcRecords helper.
an equivalent pointer to a new (winning) Grand Masters Announce Packet information. The CurrentBmc data structure is then updated with the information from the NewMaster.
| [in] | NewMaster | is a pointer to a suitable data structure which has recorded. the relevant Announce Packet fields of the new (winning) Grand Master. |
| [in] | CurrentBmc | is a pointer to a suitable data structure which has. recorded the current fields of the current Grand Master's Announce Packet. |
References XAvb_PortIdentity::ClockIdentityLower, XAvb_ClockIdentity::ClockIdentityLower, XAvb_PortIdentity::ClockIdentityUpper, XAvb_ClockIdentity::ClockIdentityUpper, XAvb_BmcData::ClockQuality, XAvb_BmcData::GrandmasterIdentity, XAvb_BmcData::GrandmasterPriority1, XAvb_BmcData::GrandmasterPriority2, XAvb_PortIdentity::PortNumber, XAvb_BmcData::SourcePortIdentity, and XAvb_BmcData::stepsRemoved.
Referenced by XAvb_BecomeRtcMaster(), XAvb_DecodeRxAnnounceFrame(), and XAvb_DecodeTxAnnounceFrame().
| u16 XAvb_UpdateIntervalDuration | ( | u16 | currentIntervalDuration, |
| char | logMeanVal | ||
| ) |
A function to update a PTP message Interval Duration (defined as a.
fraction of 128 seconds). If the endpoint cannot support a requested logMeanVal then do not perform the conversion - return the current value.
| [in] | currentIntervalDuration | is the Interval Duration to be updated. |
| [in] | logMeanVal | is the base2 value that is to be converted. |
References XAvb_ConvertLogMeanToDuration(), XAVB_MAX_SUPPORTED_LOG_MEAN_INTERVAL, and XAVB_MIN_SUPPORTED_LOG_MEAN_INTERVAL.
Referenced by XAvb_DecodeRxSignaling().
| void XAvb_UpdateLogMeanMessageInterval | ( | u32 | BaseAddress, |
| u32 | PtpFrameBaseAddr, | ||
| u16 | intervalDuration | ||
| ) |
A function to update the logMeanMessageInterval field in a PTP packet.
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFrameBaseAddr | is the base address of the TX PTP Buffer to be updated. |
| [in] | intervalDuration | is the "fraction of 128" value of the data to be written. |
the relevant Tx PTP Packet Buffer is written to with the updated logMeanMessageInterval
References XAvb_ConvertDurationToLogMean(), XAVB_PTP_TX_PKT_SEQUENCEID_OFFSET, XAvb_ReadPtpBuffer, and XAvb_WritePtpBuffer.
Referenced by XAvb_DecodeRxSignaling(), and XAvb_Reset().
| void XAvb_UpdateRtcIncrement | ( | XAvb * | InstancePtr | ) |
Calculates the RTC increment value based on the slave error.
Updates the RTC increment rate based on measured sync timing error.
| [in] | InstancePtr | is a pointer to the XAvb instance. |
References XAvb_Config::BaseAddress, XAvb::Config, XAvb_PtpStruct::NewMasterTime, XAvb_PtpStruct::NewSlaveTime, XAvb_SequenceIdStruct::NewSyncSequenceId, XAvb_PtpStruct::OldMasterTime, XAvb_PtpStruct::OldSlaveTime, XAvb_SequenceIdStruct::OldSyncSequenceId, XAvb::PtpRecords, XAvb::SequenceIdRecords, XAvb_ChangePTPLockStatus(), XAVB_CLOCK_LOCK_THRESHOLD, XAVB_NUM_SYNC_FU_PAIR_CALC_RTC_INCREMENT, XAVB_ONE_SECOND, XAvb_ReadReg, XAVB_RTC_400PPM_OFFSET, XAVB_RTC_INCREMENT_NOMINAL_RATE, XAVB_RTC_INCREMENT_OFFSET, XAVB_RTC_INCREMENT_VALUE_MASK, and XAvb_WriteReg.
Referenced by XAvb_DecodeRxFollowUp().
| void XAvb_WaitOnTxPtpQueue | ( | XAvb * | InstancePtr | ) |
The software drivers are kept simple by only requesting a single PTP frame to.
Implements the XAvb_WaitOnTxPtpQueue helper.
be transmitted at a time. Checks (and if necessary waits) until the previously request PTP frame has been transmitted.
| [in] | InstancePtr | is a pointer to the XAvb instance to be worked on. |
References XAvb_Config::BaseAddress, XAvb::Config, XAVB_PTP_TX_CONTROL_OFFSET, XAVB_PTP_TX_WAIT_ALL_FRAMES_MASK, and XAvb_ReadReg.
Referenced by XAvb_MasterSendAnnounce(), XAvb_MasterSendFollowUp(), XAvb_MasterSendSync(), XAvb_SendPDelayReq(), XAvb_SendPDelayResp(), and XAvb_SendPDelayRespFollowUp().
| void XAvb_WriteRtcOffset | ( | u32 | BaseAddress, |
| XAvb_RtcFormat * | RtcValue | ||
| ) |
Writes to the Real Time Counter (RTC) Offset Registers.
| [in] | BaseAddress | is the base address of the device. |
| [in] | RtcValue | is the nanoseconds and seconds offset values that should. be written to the RTC. |
References XAvb_RtcFormat::NanoSeconds, XAvb_RtcFormat::SecondsLower, XAvb_RtcFormat::SecondsUpper, XAVB_RTC_NANOSEC_OFFSET, XAVB_RTC_NS_MASK, XAVB_RTC_SEC_LOWER_MASK, XAVB_RTC_SEC_LOWER_OFFSET, XAVB_RTC_SEC_UPPER_MASK, and XAVB_RTC_SEC_UPPER_OFFSET.
Referenced by XAvb_CalcRtcOffset().
| void XAvb_WriteToMultipleTxPtpFrames | ( | u32 | BaseAddress, |
| u32 | PtpFieldAddress, | ||
| u32 | Data, | ||
| u32 | DataBitEnable, | ||
| u8 | BufferEnable | ||
| ) |
A function to write common data (eg the Source Address) to all PTP frames.
Implements the XAvb_WriteToMultipleTxPtpFrames helper.
stored in the Tx PTP Packet buffer
| [in] | BaseAddress | is the base address of the device. |
| [in] | PtpFieldAddress | is the offset address of the relevant field in PTP. frames. |
| [in] | Data | is the common data to be written to all Tx PTP frame templates. |
| [in] | DataBitEnable | allows only selected bits of the 32-bit Data word to. be modified. |
| [in] | BufferEnable | allows the selected buffer to be selected: there are 8. PTP buffers - these are encoded as one-hot. For example, 0x3F will write the selected data to the first 6 buffers only. |
the Tx PTP Packet Buffer is written to as requested
References XAVB_PTP_TX_SYNC_OFFSET, XAvb_ReadPtpBuffer, and XAvb_WritePtpBuffer.
Referenced by main(), and XAvb_SetupSourcePortIdentity().
| void XAvbMac_ReadStats | ( | u32 | BaseAddress, |
| u32 | CounterId, | ||
| XAvb_Uint64 * | Value | ||
| ) |
Reads the given Ethernet Statistic Register.
| [in] | BaseAddress | is the base address of the device. |
| [in] | CounterId | is the statistic counter to read. |
| [in] | Value | a pointer to the read value of the 64-bit value of the counter. and it is updated by this function |
References XAvb_Uint64::Lower, and XAvb_Uint64::Upper.
| int XAxiEnet_Recv | ( | XMcdma * | InstancePtr | ) |
Receives a frame through AXI Ethernet and MCDMA.
| [in] | InstancePtr | Pointer to the driver instance. |
Referenced by AxiEthernetPingReqExample().
| int XAxienet_Send | ( | XAxiEthernet * | AxiEthernetInstancePtr, |
| XMcdma * | DmaInstancePtr, | ||
| u8 | ChanId, | ||
| UINTPTR | TxBufPtr, | ||
| u32 | len | ||
| ) |
Sends a frame through AXI Ethernet and MCDMA.
| [in] | AxiEthernetInstancePtr | Pointer to the AXI Ethernet driver instance. |
| [in] | DmaInstancePtr | Pointer to the DMA driver instance. |
| [in] | ChanId | MCDMA channel identifier. |
| [in] | TxBufPtr | Pointer to the transmit buffer. |
| [in] | len | Length of the frame in bytes. |
Referenced by SendArpReqFrame(), and SendEchoReqFrame().
| int XAxiEthernet_AddExtMulticastGroup | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
XAxiEthernet_AddExtMulticastGroup adds an entry to the multicast Ethernet.
address table. The new entry, represents a group of MAC addresses based on the contents of AddressPtr. AddressPtr is one member of the MAC address set in the newly added entry.
The device must be stopped to use this function.
Once an Ethernet address is programmed, the Axi Ethernet device will begin receiving data sent from that address. The Axi Ethernet hardware does not have a control bit to disable multicast filtering. The only way to prevent the Axi Ethernet device from receiving messages from an Ethernet address in the multicast table is to clear it with XAxiEthernet_ClearExtMulticastGroup().
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | is a pointer to the 6-byte Ethernet address to add. |
This routine consider all 2**23 possible multicast Ethernet addresses to be 8Mx1 bit or 1M bytes memory area. All defined multicast addresses are from 01.00.5E.00.00.00 to 01.00.5E.7F.FF.FF The most significant 25 bit out of 48 bit are static, so they will not be part of calculation.
The hardware requires to 'index' with bit 22-8, 15 bits in total. The least significant byte/8 bits are considered a group.
This API operates at a group (256 MAC addresses) for hardware to do the first layer address filtering. It is user's responsibility to provision this table appropriately.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_MCAST_TABLE_OFFSET, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetSgDmaIntrExtMulticastExample().
| int XAxiEthernet_CfgInitialize | ( | XAxiEthernet * | InstancePtr, |
| XAxiEthernet_Config * | CfgPtr, | ||
| UINTPTR | EffectiveAddress | ||
| ) |
XAxiEthernet_CfgInitialize initializes an AXI Ethernet device along with the.
InstancePtr that references it.
The PHY is setup independently from the Ethernet core. Use the MII or whatever other interface may be present for setup.
| [out] | InstancePtr | references the memory instance to be associated with the AXI Ethernet core instance upon initialization. |
| [in] | CfgPtr | references the structure holding the hardware configuration for the Axi Ethernet core to initialize. |
| [in] | EffectiveAddress | is the processor address used to access the base address of the AXI Ethernet instance. In systems with an MMU and virtual memory, EffectiveAddress is the virtual address mapped to the physical in ConfigPtr->Config.BaseAddress. In systems without an active MMU, EffectiveAddress should be set to the same value as ConfigPtr->Config.BaseAddress. |
References XAxiEthernet_Config::AxiDevBaseAddress, XAxiEthernet::AxiDevBaseAddress, XAxiEthernet::AxiDevType, XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, XAxiEthernet::IsReady, XAxiEthernet::PhyMode, XAxiEthernet_Config::PhyType, XAE_AXIBASEADDR_MASK, XAE_AXIDEVTYPE_MASK, and XAxiEthernet_Reset().
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPingReqExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaPollExample(), and main().
| void XAxiEthernet_ClearBadFrmRcvOption | ( | XAxiEthernet * | InstancePtr | ) |
Disables the bad frame receive option.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_RAF_OFFSET, XAE_RAF_RXBADFRMEN_MASK, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| int XAxiEthernet_ClearExtMulticastGroup | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
XAxiEthernet_ClearExtMulticastGroup clears input multicast Ethernet address.
group from table.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | is a pointer to the 6-byte Ethernet address to clear. |
Please reference XAxiEthernet_AddExtMulticastGroup for multicast address index and bit value calculation.
In table, hardware requires to 'index' with bit 22-8, 15 bits in total. The least significant byte/8 bits are considered a group.
There is a scenario that might introduce issues: When multicast tables are programmed initially to accept 01:00:5E:12:34:56 and 01:00:5E:12:34:78 but later decided to clear 01:00:5E:12:34:78. Without validating all possible combinations at the indexed entry, multicast table might be misconfigured and drop frames.
When clearing a multicast address table entry, note that a whole group of mac addresses will no longer be accepted - this because an entry in the table represents multiple(256) mac addresses.
The device must be stopped to use this function.
This API operates at a group (256 MAC addresses) level for hardware to perform the first layer address filtering. It is user's responsibility to provision this table appropriately.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_MCAST_TABLE_OFFSET, and XAxiEthernet_WriteReg.
| int XAxiEthernet_ClearOptions | ( | XAxiEthernet * | InstancePtr, |
| u32 | Options | ||
| ) |
XAxiEthernet_ClearOptions clears the options, Options for the.
Axi Ethernet, specified by InstancePtr. Axi Ethernet should be stopped with XAxiEthernet_Stop() before changing options.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Options | is a bitmask of OR'd XAE_*_OPTION values for options to clear. Options not specified are not affected. |
See xaxiethernet.h for a description of the available options.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAxiEthernet::Options, XAE_BROADCAST_OPTION, XAE_FCC_FCRX_MASK, XAE_FCC_OFFSET, XAE_FCS_INSERT_OPTION, XAE_FCS_STRIP_OPTION, XAE_FLOW_CONTROL_OPTION, XAE_FMI_OFFSET, XAE_FMI_PM_MASK, XAE_JUMBO_OPTION, XAE_LENTYPE_ERR_OPTION, XAE_MULTICAST_OPTION, XAE_PROMISC_OPTION, XAE_RAF_BCSTREJ_MASK, XAE_RAF_EMULTIFLTRENBL_MASK, XAE_RAF_MCSTREJ_MASK, XAE_RAF_NEWFNCENBL_MASK, XAE_RAF_OFFSET, XAE_RAF_RXVSTRPMODE_MASK, XAE_RAF_RXVTAGMODE_MASK, XAE_RAF_TXVSTRPMODE_MASK, XAE_RAF_TXVTAGMODE_MASK, XAE_RCW1_FCS_MASK, XAE_RCW1_JUM_MASK, XAE_RCW1_LT_DIS_MASK, XAE_RCW1_OFFSET, XAE_RCW1_RX_MASK, XAE_RCW1_VLAN_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TC_FCS_MASK, XAE_TC_JUM_MASK, XAE_TC_OFFSET, XAE_TC_TX_MASK, XAE_TC_VLAN_MASK, XAE_TRANSMITTER_ENABLE_OPTION, XAE_VLAN_OPTION, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetResetDevice(), AxiEthernetSgDmaIntrCoalescingExample(), and AxiEthernetSgDmaIntrExtMulticastExample().
| int XAxiEthernet_ClearTpid | ( | XAxiEthernet * | InstancePtr, |
| u8 | Entry | ||
| ) |
XAxiEthernet_ClearTpid clears the VLAN Tag Protocol Identifier(TPID).
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Entry | is the hardware storage location to program this address and must be between 0..XAE_TPID_MAX_ENTRIES. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_TPID0_OFFSET, XAE_TPID1_OFFSET, XAE_TPID_0_MASK, XAE_TPID_1_MASK, XAE_TPID_MAX_ENTRIES, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| void XAxiEthernet_DisableControlFrameLenCheck | ( | XAxiEthernet * | InstancePtr | ) |
Disables the length check for control frames.
When this API is called, control frames larger than the minimum frame length are accepted.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_RCW1_CL_DIS_MASK, XAE_RCW1_OFFSET, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| void XAxiEthernet_DumpExtMulticastGroup | ( | XAxiEthernet * | InstancePtr | ) |
XAxiEthernet_DumpExtMulticastGroup dumps ALL provisioned acceptable multicast.
MAC in the Axi Ethernet device's multicast table.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
Hardware requires to 'index' with bit 22-8, 15 bits in total. The least significant byte/8 bits are considered a set.
This API operates at a set (256 MAC addresses) level.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_MCAST_TABLE_OFFSET, and XAxiEthernet_ReadReg.
| void XAxiEthernet_EnableControlFrameLenCheck | ( | XAxiEthernet * | InstancePtr | ) |
Enables the length check for control frames.
After calling this API, all control frames received are checked for proper length (less than the minimum frame length). By default, control frame length check is enabled at start up. Call this API only if XAxiEthernet_DisableControlFrameLenCheck was used earlier to disable the check.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_RCW1_CL_DIS_MASK, XAE_RCW1_OFFSET, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| int XAxiEthernet_GetExtMulticastGroup | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
XAxiEthernet_GetExtMulticastGroup returns whether the given Ethernet address.
group is stored in the table.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | is a pointer to the 6-byte Ethernet address. |
In the table, hardware requires to 'index' with bit 22-8, 15 bits in total. The least significant byte/8 bits are considered a group. This API operates at a group (256 MAC addresses) level.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_MCAST_TABLE_OFFSET, and XAxiEthernet_ReadReg.
Referenced by AxiEthernetSgDmaIntrExtMulticastExample().
| void XAxiEthernet_GetMacAddress | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
Reads the MAC address for the AXI Ethernet device.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | AddressPtr | references the memory buffer to store the retrieved MAC address. This memory buffer must be at least 6 bytes in length. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_UAW0_OFFSET, XAE_UAW1_OFFSET, XAE_UAWL_OFFSET, XAE_UAWU_OFFSET, and XAxiEthernet_ReadReg.
Referenced by AxiEthernetResetDevice().
| void XAxiEthernet_GetMacPauseAddress | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
XAxiEthernet_GetMacPauseAddress gets the MAC address used for pause frames.
for the Axi Ethernet device specified by InstancePtr.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | references the memory buffer to store the retrieved MAC address. This memory buffer must be at least 6 bytes in length. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_RCW0_OFFSET, XAE_RCW1_OFFSET, and XAxiEthernet_ReadReg.
| u16 XAxiEthernet_GetOperatingSpeed | ( | XAxiEthernet * | InstancePtr | ) |
Reads the current operating link speed.
The value may come from XAxiEthernet_SetOperatingSpeed() or a hardware default.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_EMMC_LINKSPD_10, XAE_EMMC_LINKSPD_100, XAE_EMMC_LINKSPD_1000, XAE_EMMC_LINKSPEED_MASK, XAE_EMMC_OFFSET, XAE_SPEED_1000_MBPS, XAE_SPEED_100_MBPS, XAE_SPEED_10_MBPS, and XAxiEthernet_ReadReg.
| u32 XAxiEthernet_GetOptions | ( | XAxiEthernet * | InstancePtr | ) |
XAxiEthernet_GetOptions returns the current option settings.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
See xaxiethernet.h for a description of the available options.
References XAxiEthernet::IsReady, and XAxiEthernet::Options.
Referenced by AxiEthernetResetDevice().
| int XAxiEthernet_GetRgmiiStatus | ( | XAxiEthernet * | InstancePtr, |
| u16 * | SpeedPtr, | ||
| int * | IsFullDuplexPtr, | ||
| int * | IsLinkUpPtr | ||
| ) |
XAxiEthernet_GetRgmiiStatus get the state of the link when using the RGMII.
media interface.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | SpeedPtr | references the location to store the result, which is the auto negotiated link speed in units of Mbits/sec, either 0, 10, 100, or 1000. |
| [out] | IsFullDuplexPtr | references the value that is set by this function to indicate full duplex operation. IsFullDuplexPtr is set to TRUE when the RGMII link is operating in full duplex mode, otherwise it is set to FALSE. |
| [out] | IsLinkUpPtr | references the value that is set by this function to indicate the link status.IsLinkUpPtr is set to TRUE when the RGMII link up, otherwise it is set to FALSE. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_PHY_TYPE_RGMII_1_3, XAE_PHY_TYPE_RGMII_2_0, XAE_PHYC_OFFSET, XAE_PHYC_RGLINKSPD_10, XAE_PHYC_RGLINKSPD_100, XAE_PHYC_RGLINKSPD_1000, XAE_PHYC_RGMIIHD_MASK, XAE_PHYC_RGMIILINK_MASK, XAE_PHYC_RGMIILINKSPEED_MASK, XAE_SPEED_1000_MBPS, XAE_SPEED_100_MBPS, XAE_SPEED_10_MBPS, and XAxiEthernet_ReadReg.
| int XAxiEthernet_GetSgmiiStatus | ( | XAxiEthernet * | InstancePtr, |
| u16 * | SpeedPtr | ||
| ) |
XAxiEthernet_GetSgmiiStatus get the state of the link when using the SGMII.
media interface.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | SpeedPtr | references the location to store the result, which is the auto negotiated link speed in units of Mbits/sec, either 0, 10, 100, or 1000. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_PHY_TYPE_SGMII, XAE_PHYC_OFFSET, XAE_PHYC_SGLINKSPD_10, XAE_PHYC_SGLINKSPD_100, XAE_PHYC_SGLINKSPD_1000, XAE_PHYC_SGMIILINKSPEED_MASK, XAE_SPEED_1000_MBPS, XAE_SPEED_100_MBPS, XAE_SPEED_10_MBPS, and XAxiEthernet_ReadReg.
| void XAxiEthernet_GetTpid | ( | XAxiEthernet * | InstancePtr, |
| u16 * | TpidPtr, | ||
| u8 | Entry | ||
| ) |
XAxiEthernet_GetTpid gets the VLAN Tag Protocol Identifier value (TPID).
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | TpidPtr | references the location to store the result. |
| [in] | Entry | is the hardware storage location to program this address and must be between 0..XAE_TPID_MAX_ENTRIES. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_TPID0_OFFSET, XAE_TPID1_OFFSET, XAE_TPID_0_MASK, XAE_TPID_MAX_ENTRIES, and XAxiEthernet_ReadReg.
| void XAxiEthernet_GetVidTable | ( | XAxiEthernet * | InstancePtr, |
| u32 | Entry, | ||
| u32 * | VidPtr, | ||
| u8 * | StripPtr, | ||
| u8 * | TagPtr, | ||
| int | Dir | ||
| ) |
XAxiEthernet_GetVidTable gets VID table content includes new VLAN ID, strip.
and tag enable bits.
The device must be stopped to use this function.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Entry | is the hardware storage location/index to program updated VID value, strip, or tag value. The value must be between 0..0xFFF. |
| [out] | VidPtr | references the location to store the result. Stores the Vid value indexed by Entry into this location. |
| [out] | StripPtr | references the location to store the result. Stores the strip enable bit value indexed by Entry into this location. |
| [out] | TagPtr | references the location to store the result. This function stores the tag enable bit value indexed by Entry into this location. |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
The hardware requires the table to be 'indexed' with Entry and must be 0x000..0xFFF.
Bits layout is bbbb bbbb bbbb b b VLAN ID (12b), | | | VLAN double tag enable bit VLAN strip enable bit
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_MAX_VLAN_TABL_ENTRY, XAE_RX, XAE_RX_VLAN_DATA_OFFSET, XAE_TX, XAE_TX_VLAN_DATA_OFFSET, XAE_VLAN_TABL_STRP_ENTRY_MASK, XAE_VLAN_TABL_STRP_STRT_OFFSET, XAE_VLAN_TABL_TAG_ENTRY_MASK, XAE_VLAN_TABL_VID_START_OFFSET, and XAxiEthernet_ReadReg.
| void XAxiEthernet_GetVStripMode | ( | XAxiEthernet * | InstancePtr, |
| u8 * | ModePtr, | ||
| int | Dir | ||
| ) |
XAxiEthernet_GetVStripMode gets the VLAN stripping mode.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | ModePtr | references the location to store the VLAN strip mode returned by this function. Value is b'00, b'01 or b'11. Refer XAE_VTSRAP_* in xaxiethernet.h file for the details. |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
Mode value shifting is handled in this function. No shifting is required to call this function.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_RAF_OFFSET, XAE_RAF_RXVSTRPMODE_MASK, XAE_RAF_RXVSTRPMODE_SHIFT, XAE_RAF_TXVSTRPMODE_MASK, XAE_RAF_TXVSTRPMODE_SHIFT, XAE_RX, XAE_TX, and XAxiEthernet_ReadReg.
| void XAxiEthernet_GetVTagMode | ( | XAxiEthernet * | InstancePtr, |
| u8 * | ModePtr, | ||
| int | Dir | ||
| ) |
XAxiEthernet_GetVTagMode gets VLAN tagging mode.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | ModePtr | references the location to store the VLAN tag mode. Value is between b'00-b'11. |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
The device must be stopped to use this function.
Mode value shifting is handled in this function. No shifting is required to call this function.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_RAF_OFFSET, XAE_RAF_RXVTAGMODE_MASK, XAE_RAF_RXVTAGMODE_SHIFT, XAE_RAF_TXVTAGMODE_MASK, XAE_RAF_TXVTAGMODE_SHIFT, XAE_RX, XAE_TX, and XAxiEthernet_ReadReg.
| void XAxiEthernet_GetVTagValue | ( | XAxiEthernet * | InstancePtr, |
| u32 * | VTagValuePtr, | ||
| int | Dir | ||
| ) |
XAxiEthernet_GetVTagValue gets the configured VLAN tagging value.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [out] | VTagValuePtr | references the location to store the result. Format is TPID, one of the following 16 bit values, 0x8100, 0x88a8, 0x9100, 0x9200. Priority, 3 bits CFI, 1 bit VID, 12 bits |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
Ethernet VLAN frames' VLAN type/length(2B) and tag control information(2B). Bit layout : bbbb bbbb bbbb bbbb bbb b bbbb bbbb bbbb \ / | | \ VID (12b) / \ / | CFI bit (1b) TPID (16b) priority bit (3b)
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_RTAG_OFFSET, XAE_RX, XAE_TTAG_OFFSET, XAE_TX, and XAxiEthernet_ReadReg.
| int XAxiEthernet_Initialize | ( | XAxiEthernet * | InstancePtr, |
| XAxiEthernet_Config * | CfgPtr, | ||
| UINTPTR | EffectiveAddress | ||
| ) |
XAxiEthernet_Initialize initializes an AXI Ethernet device along with the.
InstancePtr that references it.
The PHY is setup independently from the Ethernet core. Use the MII or whatever other interface may be present for setup.
| [out] | InstancePtr | references the memory instance to be associated with the AXI Ethernet core instance upon initialization. |
| [in] | CfgPtr | references the structure holding the hardware configuration for the Axi Ethernet core to initialize. |
| [in] | EffectiveAddress | is the processor address used to access the base address of the AXI Ethernet instance. In systems with an MMU and virtual memory, EffectiveAddress is the virtual address mapped to the physical in ConfigPtr->Config.BaseAddress. In systems without an active MMU, EffectiveAddress should be set to the same value as ConfigPtr->Config.BaseAddress. |
References XAxiEthernet_Config::AxiDevBaseAddress, XAxiEthernet::AxiDevBaseAddress, XAxiEthernet::AxiDevType, XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet_Config::IntrId, XAxiEthernet_Config::IntrParent, XAxiEthernet::IsReady, XAE_AXIBASEADDR_MASK, and XAE_AXIDEVTYPE_MASK.
| XAxiEthernet_Config * XAxiEthernet_LookupConfig | ( | UINTPTR | BaseAddress | ) |
Looks up device configuration by base address.
Implementation of XAxiEthernet_LookupConfig().
| [in] | BaseAddress | is the base address of the device to look up. |
See xaxiethernet.h for the API description.
References XAxiEthernet_Config::Name.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPingReqExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaPollExample(), and main().
| int XAxiEthernet_MulticastAdd | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr, | ||
| int | Entry | ||
| ) |
XAxiEthernet_MulticastAdd adds the Ethernet address, AddressPtr to the.
Axi Ethernet device's multicast filter list, at list index Entry. The address referenced by AddressPtr may be of any unicast, multicast, or broadcast address form. The hardware for the Axi Ethernet device can hold up to C_Number_of_Table_Entries addresses in this filter list.
The device must be stopped to use this function.
Once an Ethernet address is programmed, the Axi Ethernet device will begin receiving data sent from that address. The Axi Ethernet hardware does not have a control bit to disable multicast filtering. The only way to prevent the Axi Ethernet device from receiving messages from an Ethernet address in the Multicast Address Table (MAT) is to clear it with XAxiEthernet_MulticastClear().
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | is a pointer to the 6-byte Ethernet address to set. The previous address at the location Entry (if any) is overwritten with the value at AddressPtr. |
| [in] | Entry | is the hardware storage location to program this address and must be between 0 to (C_Number_of_Table_Entries - 1). |
This routine works only with normal multicast filtering feature. A maximum of 4 multicast addresses can be stored in the HW provided multicast table.
To use the extended multicast feature, extended multicast filtering must be enabled by using driver API XAxiEthernet_SetOptions with proper option fields set. Once extended multicast filtering is enabled, the APIs XAxiEthernet_[Add|Clear|Get]ExtMulticastGroup() must be used to manage multicast address groups.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_AF0_OFFSET, XAE_AF1_OFFSET, XAE_FMI_OFFSET, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| int XAxiEthernet_MulticastClear | ( | XAxiEthernet * | InstancePtr, |
| int | Entry | ||
| ) |
XAxiEthernet_MulticastClear clears the Ethernet address stored at index.
Entry in the Axi Ethernet device's multicast filter list.
The device must be stopped to use this function.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Entry | is the HW storage location used when this address was added. It must be between 0 to (C_Number_of_Table_Entries - 1). |
This routine works only with normal multicast filtering feature. A maximum of 4 multicast addresses can be stored in the HW provided multicast table.
To use the extended multicast feature, extended multicast filtering must be enabled by using driver API XAxiEthernet_SetOptions with proper option fields set. Once extended multicast filtering is enabled, the APIs XAxiEthernet_[Add|Clear|Get]ExtMulticastGroup() must be used to manage multicast address groups.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_AF0_OFFSET, XAE_AF1_OFFSET, XAE_FMI_OFFSET, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| void XAxiEthernet_MulticastGet | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr, | ||
| int | Entry | ||
| ) |
XAxiEthernet_MulticastGet gets the Ethernet address stored at.
index Entry in the Axi Ethernet device's multicast filter list.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | references the memory buffer to store the retrieved Ethernet address. This memory buffer must be at least 6 bytes in length. |
| [in] | Entry | is the hardware storage location from which to retrieve the address and must be between 0 to (C_Number_of_Table_Entries - 1) |
This routine works only with normal multicast filtering feature. A maximum of 4 multicast addresses can be stored in the HW provided multicast table.
To use the extended multicast feature, extended multicast filtering must be enabled by using driver API XAxiEthernet_SetOptions with proper option fields set. Once extended multicast filtering is enabled, the APIs XAxiEthernet_[Add|Clear|Get]ExtMulticastGroup() must be used to manage multicast address groups.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_AF0_OFFSET, XAE_AF1_OFFSET, XAE_FMI_OFFSET, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| void XAxiEthernet_PhyRead | ( | XAxiEthernet * | InstancePtr, |
| u32 | PhyAddress, | ||
| u32 | RegisterNum, | ||
| u16 * | PhyDataPtr | ||
| ) |
XAxiEthernet_PhyRead reads the specified PHY register, RegiseterNum.
on the PHY specified by PhyAddress into PhyDataPtr. This Ethernet driver does not require the device to be stopped before reading from the PHY. It is the responsibility of the calling code to stop the device if it is deemed necessary.
Note that the Axi Ethernet hardware provides the ability to talk to a PHY that adheres to the Media Independent Interface (MII) as defined in the IEEE 802.3 standard.
It is important that calling code set up the MDIO clock with XAxiEthernet_PhySetMdioDivisor() prior to accessing the PHY with this function.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | PhyAddress | is the address of the PHY to be written (multiple PHYs supported). |
| [in] | RegisterNum | is the register number, 0-31, of the specific PHY register to write. |
| [out] | PhyDataPtr | is a reference to the location where the 16-bit result value is stored. |
There is the possibility that this function will not return if the hardware is broken (i.e., it never sets the status bit indicating that the write is done). If this is of concern, the calling code should provide a mechanism suitable for recovery.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_MDIO_MCR_INITIATE_MASK, XAE_MDIO_MCR_OFFSET, XAE_MDIO_MCR_OP_READ_MASK, XAE_MDIO_MCR_PHYAD_MASK, XAE_MDIO_MCR_PHYAD_SHIFT, XAE_MDIO_MCR_READY_MASK, XAE_MDIO_MCR_REGAD_MASK, XAE_MDIO_MCR_REGAD_SHIFT, XAE_MDIO_MRD_OFFSET, XAE_PHY_ADDR_LIMIT, XAE_PHY_REG_NUM_LIMIT, XAE_RST_DEFAULT_TIMEOUT_VAL, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEtherentConfigureTIPhy(), AxiEthernetDetectPHY(), AxiEthernetUtilConfigureInternalPhy(), AxiEthernetUtilEnterLoopback(), and PhySetup().
| void XAxiEthernet_PhySetMdioDivisor | ( | XAxiEthernet * | InstancePtr, |
| u8 | Divisor | ||
| ) |
XAxiEthernet_PhySetMdioDivisor sets the MDIO clock divisor in the.
Axi Ethernet,specified by InstancePtr to the value, Divisor. Must be called once after each reset prior to accessing MII PHY registers.
From the Virtex-6(TM) and Spartan-6 (TM) Embedded Tri-Mode Ethernet MAC User's Guide, the following equation governs the MDIO clock to the PHY:
f[HOSTCLK]
f[MDC] = -----------------------
(1 + Divisor) * 2
where f[HOSTCLK] is the bus clock frequency in MHz, and f[MDC] is the MDIO clock frequency in MHz to the PHY. Typically, f[MDC] should not exceed 2.5 MHz. Some PHYs can tolerate faster speeds which means faster access.
| [in] | InstancePtr | references the Axi Ethernet instance on which to operate. |
| [in] | Divisor | is the divisor value to set within the range of 0 to XAE_MDIO_MC_CLK_DVD_MAX. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_MDIO_MC_CLOCK_DIVIDE_MAX, XAE_MDIO_MC_MDIOEN_MASK, XAE_MDIO_MC_OFFSET, and XAxiEthernet_WriteReg.
| void XAxiEthernet_PhyWrite | ( | XAxiEthernet * | InstancePtr, |
| u32 | PhyAddress, | ||
| u32 | RegisterNum, | ||
| u16 | PhyData | ||
| ) |
XAxiEthernet_PhyWrite writes PhyData to the specified PHY register, RegiseterNum on the PHY specified by PhyAddress.
This Ethernet driver does not require the device to be stopped before writing to the PHY. It is the responsibility of the calling code to stop the device if it is deemed necessary.
Note that the Axi Ethernet hardware provides the ability to talk to a PHY that adheres to the Media Independent Interface (MII) as defined in the IEEE 802.3 standard.
It is important that calling code set up the MDIO clock with XAxiEthernet_PhySetMdioDivisor() prior to accessing the PHY with this function.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | PhyAddress | is the address of the PHY to be written (multiple PHYs supported). |
| [in] | RegisterNum | is the register number, 0-31, of the specific PHY register to write. |
| [in] | PhyData | is the 16-bit value that will be written to the register. |
There is the possibility that this function will not return if the hardware is broken (i.e., it never sets the status bit indicating that the write is done). If this is of concern, the calling code should provide a mechanism suitable for recovery.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_MDIO_MCR_INITIATE_MASK, XAE_MDIO_MCR_OFFSET, XAE_MDIO_MCR_OP_WRITE_MASK, XAE_MDIO_MCR_PHYAD_MASK, XAE_MDIO_MCR_PHYAD_SHIFT, XAE_MDIO_MCR_READY_MASK, XAE_MDIO_MCR_REGAD_MASK, XAE_MDIO_MCR_REGAD_SHIFT, XAE_MDIO_MWD_OFFSET, XAE_PHY_ADDR_LIMIT, XAE_PHY_REG_NUM_LIMIT, XAE_RST_DEFAULT_TIMEOUT_VAL, and XAxiEthernet_WriteReg.
Referenced by AxiEtherentConfigureTIPhy(), AxiEthernetUtilConfigureInternalPhy(), AxiEthernetUtilEnterLoopback(), and PhySetup().
| void XAxiEthernet_Reset | ( | XAxiEthernet * | InstancePtr | ) |
XAxiEthernet_Reset does not perform a soft reset of the AxiEthernet core.
AxiEthernet hardware is reset by the device connected to the AXI4-Stream interface. Inserts some delay before proceeding to check for MgtRdy bit. The delay is necessary to be at a safe side. It takes a while for the reset process to complete and for any of the AxiEthernet registers to be accessed. It then checks for MgtRdy bit in IS register to know if AxiEthernet reset is completed or not. Subsequently it calls one more driver function to complete the AxiEthernet hardware initialization.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::Options, XAE_DEFAULT_OPTIONS, XAE_INT_MGTRDY_MASK, XAE_IS_OFFSET, XAE_RST_DEFAULT_TIMEOUT_VAL, and XAxiEthernet_Stop().
Referenced by AxiEthernetResetDevice(), and XAxiEthernet_CfgInitialize().
| int XAxiEthernet_SendPausePacket | ( | XAxiEthernet * | InstancePtr, |
| u16 | PauseValue | ||
| ) |
XAxiEthernet_SendPausePacket sends a pause packet with the value of.
PauseValue.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | PauseValue | is the pause value in units of 512 bit times. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_TPF_OFFSET, XAE_TPF_TPFV_MASK, and XAxiEthernet_WriteReg.
| void XAxiEthernet_SetBadFrmRcvOption | ( | XAxiEthernet * | InstancePtr | ) |
Enables the bad frame receive option.
When enabled, bad receive frames are allowed and passed to the AXI4-Stream interface as if they are good frames.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAE_RAF_OFFSET, XAE_RAF_RXBADFRMEN_MASK, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| int XAxiEthernet_SetMacAddress | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
Sets the MAC address for the AXI Ethernet device.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | is a reference to the 6-byte MAC address to set. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_UAW0_OFFSET, XAE_UAW1_OFFSET, XAE_UAW1_UNICASTADDR_MASK, XAE_UAWL_OFFSET, XAE_UAWU_OFFSET, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPingReqExample(), AxiEthernetPolledExample(), AxiEthernetResetDevice(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), and AxiEthernetSgDmaSingleFrameExample().
| int XAxiEthernet_SetMacPauseAddress | ( | XAxiEthernet * | InstancePtr, |
| void * | AddressPtr | ||
| ) |
XAxiEthernet_SetMacPauseAddress sets the MAC address used for pause frames.
to AddressPtr. AddressPtr will be the address the Axi Ethernet device will recognize as being for pause frames. Pause frames transmitted with XAxiEthernet_SendPausePacket() will also use this address.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | AddressPtr | is a pointer to the 6-byte Ethernet address to set. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_RCW0_OFFSET, XAE_RCW1_OFFSET, XAE_RCW1_PAUSEADDR_MASK, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
| int XAxiEthernet_SetOperatingSpeed | ( | XAxiEthernet * | InstancePtr, |
| u16 | Speed | ||
| ) |
Sets the current operating link speed.
For any traffic to pass, this speed must match the current MII/GMII/SGMII/RGMII link speed.
| [in] | InstancePtr | references the Axi Ethernet on which to operate. |
| [in] | Speed | is the speed to set in units of Mbps. Valid values are 10, 100, or 1000. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAE_EMMC_LINKSPD_100, XAE_EMMC_LINKSPD_1000, XAE_EMMC_LINKSPEED_MASK, XAE_EMMC_OFFSET, XAE_PHY_TYPE_1000BASE_X, XAE_PHY_TYPE_MII, XAE_SPEED_1000_MBPS, XAE_SPEED_100_MBPS, XAE_SPEED_10_MBPS, XAE_SPEED_2500_MBPS, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetPolledExample(), AxiEthernetSgDmaIntrExample(), and AxiEthernetSgDmaPollExample().
| int XAxiEthernet_SetOptions | ( | XAxiEthernet * | InstancePtr, |
| u32 | Options | ||
| ) |
XAxiEthernet_SetOptions enables the options, Options for the.
Axi Ethernet, specified by InstancePtr. Axi Ethernet should be stopped with XAxiEthernet_Stop() before changing options.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Options | is a bitmask of OR'd XAE_*_OPTION values for options to set. Options not specified are not affected. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAxiEthernet::Options, XAE_BROADCAST_OPTION, XAE_DEFAULT_OPTIONS, XAE_DEFAULT_RXVSTRP_MODE, XAE_DEFAULT_RXVTAG_MODE, XAE_DEFAULT_TXVSTRP_MODE, XAE_DEFAULT_TXVTAG_MODE, XAE_FCC_FCRX_MASK, XAE_FCC_OFFSET, XAE_FCS_INSERT_OPTION, XAE_FCS_STRIP_OPTION, XAE_FLOW_CONTROL_OPTION, XAE_FMI_OFFSET, XAE_FMI_PM_MASK, XAE_JUMBO_OPTION, XAE_LENTYPE_ERR_OPTION, XAE_MULTICAST_OPTION, XAE_PROMISC_OPTION, XAE_RAF_BCSTREJ_MASK, XAE_RAF_EMULTIFLTRENBL_MASK, XAE_RAF_MCSTREJ_MASK, XAE_RAF_NEWFNCENBL_MASK, XAE_RAF_OFFSET, XAE_RAF_RXVSTRPMODE_MASK, XAE_RAF_RXVSTRPMODE_SHIFT, XAE_RAF_RXVTAGMODE_MASK, XAE_RAF_RXVTAGMODE_SHIFT, XAE_RAF_TXVSTRPMODE_MASK, XAE_RAF_TXVSTRPMODE_SHIFT, XAE_RAF_TXVTAGMODE_MASK, XAE_RAF_TXVTAGMODE_SHIFT, XAE_RCW1_FCS_MASK, XAE_RCW1_JUM_MASK, XAE_RCW1_LT_DIS_MASK, XAE_RCW1_OFFSET, XAE_RCW1_RX_MASK, XAE_RCW1_VLAN_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TC_FCS_MASK, XAE_TC_JUM_MASK, XAE_TC_OFFSET, XAE_TC_TX_MASK, XAE_TC_VLAN_MASK, XAE_TRANSMITTER_ENABLE_OPTION, XAE_VLAN_OPTION, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetPingReqExample(), AxiEthernetResetDevice(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), and AxiEthernetSgDmaSingleFrameExample().
| int XAxiEthernet_SetTpid | ( | XAxiEthernet * | InstancePtr, |
| u16 | Tpid, | ||
| u8 | Entry | ||
| ) |
XAxiEthernet_SetTpid sets the VLAN Tag Protocol Identifier(TPID).
Four values can be configured - 0x8100, 0x9100, 0x9200, 0x88A8.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Tpid | is a hex value to be added to the TPID table. The four values that can be added are 0x8100, 0x9100, 0x9200, 0x88A8. |
| [in] | Entry | is the hardware storage location to program this address and must be between 0..XAE_TPID_MAX_ENTRIES. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_TPID0_OFFSET, XAE_TPID1_OFFSET, XAE_TPID_0_MASK, XAE_TPID_1_MASK, XAE_TPID_MAX_ENTRIES, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| int XAxiEthernet_SetVidTable | ( | XAxiEthernet * | InstancePtr, |
| u32 | Entry, | ||
| u32 | Vid, | ||
| u8 | Strip, | ||
| u8 | Tag, | ||
| int | Dir | ||
| ) |
XAxiEthernet_SetVidTable sets VID table includes new VLAN ID, strip.
and tag enable bits.
The device must be stopped to use this function.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Entry | is the hardware storage location/index to program updated VID value, strip, or tag value. The value must be between 0..0xFFF. |
| [in] | Vid | is updated/translated Vid value to be programmed. |
| [in] | Strip | is strip enable indication for Vid. |
| [in] | Tag | is tag enable indication for Vid. |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
The hardware requires the table to be 'indexed' with Entry and must be 0x000..0xFFF.
Bits layout is bbbb bbbb bbbb b b VLAN ID (12b), | | | VLAN double tag enable bit VLAN strip enable bit
To disable translation indexed by Entry, Set Vid = Entry.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_MAX_VLAN_TABL_ENTRY, XAE_RX, XAE_RX_VLAN_DATA_OFFSET, XAE_TX, XAE_TX_VLAN_DATA_OFFSET, XAE_VLAN_TABL_STRP_FLD_LEN, XAE_VLAN_TABL_STRP_STRT_OFFSET, XAE_VLAN_TABL_TAG_FLD_LEN, XAE_VLAN_TABL_VID_START_OFFSET, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| int XAxiEthernet_SetVStripMode | ( | XAxiEthernet * | InstancePtr, |
| u32 | Mode, | ||
| int | Dir | ||
| ) |
XAxiEthernet_SetVStripMode configures the VLAN strip mode.
Three modes can be configured :
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Mode | is the VLAN strip mode. Value must be b'00, b'01, or b'11. |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
The device must be stopped to use this function.
The third mode (specified by XAE_VSTRP_SELECT) requires a method for specifying which tagged frames should be stripped. The VLAN translation table 'stripped enabled' is referenced. That configuration is handled in XAxiEthernet_SetVidTable().
Mode value shifting is handled in this function. No shifting is required to call this function.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_RAF_OFFSET, XAE_RAF_RXVSTRPMODE_MASK, XAE_RAF_RXVSTRPMODE_SHIFT, XAE_RAF_TXVSTRPMODE_MASK, XAE_RAF_TXVSTRPMODE_SHIFT, XAE_RX, XAE_TX, XAE_VSTRP_ALL, XAE_VSTRP_NONE, XAE_VSTRP_SELECT, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| int XAxiEthernet_SetVTagMode | ( | XAxiEthernet * | InstancePtr, |
| u32 | Mode, | ||
| int | Dir | ||
| ) |
XAxiEthernet_SetVTagMode configures the VLAN tagging mode.
Four modes can be configured,
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | Mode | is the VLAN tag mode. Value must be between b'00-b'11. |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
The device must be stopped to use this function.
The fourth mode (specified by XAE_VTAG_SELECT) requires a method for specifying which tagged frames should receive an additional VLAN tag. The VLAN translation table 'tag enabled' is referenced. That configuration is handled in XAxiEthernet_SetVidTable().
Mode value shifting is handled in this function. No shifting is required to call this function.
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_RAF_OFFSET, XAE_RAF_RXVTAGMODE_MASK, XAE_RAF_RXVTAGMODE_SHIFT, XAE_RAF_TXVTAGMODE_MASK, XAE_RAF_TXVTAGMODE_SHIFT, XAE_RX, XAE_TX, XAE_VTAG_ALL, XAE_VTAG_EXISTED, XAE_VTAG_NONE, XAE_VTAG_SELECT, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| int XAxiEthernet_SetVTagValue | ( | XAxiEthernet * | InstancePtr, |
| u32 | VTagValue, | ||
| int | Dir | ||
| ) |
XAxiEthernet_SetVTagValue configures the VLAN tagging value.
The device must be stopped to use this function.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
| [in] | VTagValue | is the VLAN tag value to be configured. A 32bit value. TPID, one of the following 16 bit values, 0x8100, 0x88a8, 0x9100, 0x9200. Priority, 3 bits CFI, 1 bit VID, 12 bits |
| [in] | Dir | must be either XAE_TX or XAE_RX. |
The four supported TPID values are 0x8100, 0x88a8, 0x9100, 0x9200. XAxiEthernet_SetVTagValue performs verification on TPID only.
Ethernet VLAN frames' VLAN type/length(2B) and tag control information(2B). Bit layout : bbbb bbbb bbbb bbbb bbb b bbbb bbbb bbbb \ / | | \ VID (12b) / \ / | CFI bit (1b) TPID (16b) priority bit (3b)
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_RTAG_OFFSET, XAE_RX, XAE_TTAG_OFFSET, XAE_TX, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetSgDmaIntrExtVlanExample().
| void XAxiEthernet_Start | ( | XAxiEthernet * | InstancePtr | ) |
XAxiEthernet_Start starts the Axi Ethernet device as follows:.
- Enable transmitter if XAE_TRANSMIT_ENABLE_OPTION is set - Enable receiver if XAE_RECEIVER_ENABLE_OPTION is set
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAxiEthernet::Options, XAE_RCW1_OFFSET, XAE_RCW1_RX_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TC_OFFSET, XAE_TC_TX_MASK, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetPingReqExample(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetSgDmaIntrExtVlanExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), and AxiEthernetSingleFramePolledExample().
| void XAxiEthernet_Stop | ( | XAxiEthernet * | InstancePtr | ) |
XAxiEthernet_Stop gracefully stops the Axi Ethernet device as follows:.
- Disable all interrupts from this device - Disable the receiver
XAxiEthernet_Stop does not modify any of the current device options.
Since the transmitter is not disabled, frames currently in internal buffers or in process by a DMA engine are allowed to be transmitted.
| [in] | InstancePtr | is a pointer to the Axi Ethernet instance to be worked on. |
References XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet::IsReady, XAxiEthernet::IsStarted, XAE_IE_OFFSET, XAE_INT_RXRJECT_MASK, XAE_IP_OFFSET, XAE_IS_OFFSET, XAE_RCW1_OFFSET, XAE_RCW1_RX_MASK, XAxiEthernet_ReadReg, and XAxiEthernet_WriteReg.
Referenced by AxiEthernetExtVlanExample(), AxiEthernetFifoIntrExample(), AxiEthernetMcastExample(), AxiEthernetMultipleFramesIntrExample(), AxiEthernetMultipleFramesPolledExample(), AxiEthernetResetDevice(), AxiEthernetSgDmaFullChecksumOffloadExample(), AxiEthernetSgDmaIntrCoalescingExample(), AxiEthernetSgDmaIntrExample(), AxiEthernetSgDmaIntrMultiFrameExample(), AxiEthernetSgDmaIntrSingleFrameExample(), AxiEthernetSgDmaMultiFrameExample(), AxiEthernetSgDmaPartialChecksumOffloadExample(), AxiEthernetSgDmaPollExample(), AxiEthernetSgDmaSingleFrameExample(), AxiEthernetSingleFrameIntrExample(), AxiEthernetSingleFrameNonContIntrExample(), AxiEthernetSingleFramePolledExample(), and XAxiEthernet_Reset().