![]() |
axiethernet
Vitis Drivers API Documentation
|
Implements examples that utilize the AXI Ethernet's interrupt driven DMA packet transfer mode to send and receive multicast frames when XAE_EXT_MULTICAST_OPTION is enabled.
This example demonstrates:
Functional guide to example:
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a asa 4/30/10 First release based on the ll temac driver 1.01a asa 12/10/10 Changes made to enable the AXIDMA Tx/Rx ring interrupts before allocation of Tx/Rx BDs. 3.00a asa 6/25/12 Modified XAxiDma_BdSetLength API call to support new AXI DMA driver version 7.00a. 3.00a bss 10/22/12 Added support for Fast Interrupt Handlers. 3.01a srt 02/14/13 Added support for Zynq (CR 681136) 5.4 ms 01/23/17 Modified xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. ms 04/05/17 Added tabspace for return statements in functions for proper documentation while generating doxygen. 5.7 rsp 19/12/17 Defined Padding and ExternalLoopback variables.
Functions | |
int | AxiEthernetMcastExample (INTC *IntcInstancePtr, XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr, u16 AxiEthernetDeviceId, u16 AxiDmaDeviceId, u16 AxiEthernetIntrId, u16 DmaRxIntrId, u16 DmaTxIntrId) |
This function demonstrates the usage usage of the Axi Ethernet extended multicast feature. More... | |
int | AxiEthernetSgDmaIntrExtMulticastExample (XAxiEthernet *AxiEthernetInstancePtr, XAxiDma *DmaInstancePtr) |
This example sends and receives a single packet in loopback mode with extended multicast address support. More... | |
int | main (void) |
This is the main function for the Axi Ethernet example. More... | |
int AxiEthernetMcastExample | ( | INTC * | IntcInstancePtr, |
XAxiEthernet * | AxiEthernetInstancePtr, | ||
XAxiDma * | DmaInstancePtr, | ||
u16 | AxiEthernetDeviceId, | ||
u16 | AxiDmaDeviceId, | ||
u16 | AxiEthernetIntrId, | ||
u16 | DmaRxIntrId, | ||
u16 | DmaTxIntrId | ||
) |
This function demonstrates the usage usage of the Axi Ethernet extended multicast feature.
It uses AXI DMA core in interrupt mode to transfer Ethernet frames.
IntcInstancePtr | is a pointer to the instance of the Intc component. |
AxiEthernetInstancePtr | is a pointer to the instance of the AxiEthernet component. |
DmaInstancePtr | is a pointer to the instance of the AXIDMA component. |
AxiEthernetDeviceId | is Device ID of the Axi Ethernet Device , typically XPAR_<AXIETHERNET_instance>_DEVICE_ID value from xparameters.h. |
AxiDmaDeviceId | is Device ID of the Axi DMAA Device , typically XPAR_<AXIDMA_instance>_DEVICE_ID value from xparameters.h. |
AxiEthernetIntrId | is the Interrupt ID and is typically XPAR_<INTC_instance>_<AXIETHERNET_instance>_VEC_ID value from xparameters.h. |
DmaRxIntrId | is the interrupt id for DMA Rx and is typically taken from XPAR_<AXIETHERNET_instance>_CONNECTED_DMARX_INTR |
DmaTxIntrId | is the interrupt id for DMA Tx and is typically taken from XPAR_<AXIETHERNET_instance>_CONNECTED_DMATX_INTR |
References XAxiEthernet_Config::AxiDevBaseAddress, XAxiEthernet_Config::AxiDevType, AxiEthernetSgDmaIntrExtMulticastExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, XAxiEthernet::Config, XAxiEthernet_CfgInitialize(), XAxiEthernet_GetPhysicalInterface, XAxiEthernet_IsExtMcast, XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOperatingSpeed(), and XAxiEthernet_Stop().
Referenced by main().
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 programed multicast addresses.
On receive, HW should pass the frame to receive interrupt handler for further address checking.
AxiEthernetInstancePtr | is a pointer to the instance of the AxiEthernet component. |
DmaInstancePtr | is a pointer to the instance of the AXI DMA component. |
References AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAxiEthernet::Options, XAE_DEFAULT_OPTIONS, XAE_EXT_MULTICAST_OPTION, XAE_INT_RECV_ERROR_MASK, XAE_RECEIVER_ENABLE_OPTION, XAE_TRANSMITTER_ENABLE_OPTION, XAxiEthernet_AddExtMulticastGroup(), XAxiEthernet_ClearOptions(), XAxiEthernet_GetExtMulticastGroup(), XAxiEthernet_IntEnable, XAxiEthernet_IsExtMcast, XAxiEthernet_SetMacAddress(), XAxiEthernet_SetOptions(), and XAxiEthernet_Start().
Referenced by AxiEthernetMcastExample().
int main | ( | void | ) |
This is the main function for the Axi Ethernet example.
This function is not included if the example is generated from the TestAppGen test tool.
None. |
References AXIETHERNET_DEVICE_ID, AxiEthernetMcastExample(), and AxiEthernetUtilErrorTrap().