![]() |
axiethernet
Vitis Drivers API Documentation
|
#include "xparameters.h"#include "xstatus.h"#include "xmcdma.h"#include "stdio.h"#include "xil_io.h"#include "xil_printf.h"#include "xil_cache.h"#include "xaxiethernet.h"#include "sleep.h"Macros | |
| #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... | |
Functions | |
| 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 | main () |
| Main entry point for the AVB example. More... | |
| int | CheckTxDmaResult (XMcdma *InstancePtr) |
| Checks the transmit DMA completion result. More... | |
| int | GetBufAddr () |
| Returns a transmit buffer address for the channel. More... | |
| int | GetRxBufAddr () |
| Returns a receive buffer address for the channel. More... | |