![]() |
axiethernet
Vitis Drivers API Documentation
|
Implements examples that utilize the Axi Ethernet's FIFO direct frame transfer mode in a polled fashion to send and receive frames.
These examples demonstrate:
Functional guide to example:
Note that the advanced frame processing algorithms shown here are not limited to polled mode operation. The same techniques can be used for FIFO direct interrupt driven mode as well.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a asa 4/30/10 First release based on the ll temac driver 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.
Functions | |
int | AxiEthernetPolledExample (u16 AxiEthernetDeviceId, u16 FifoDeviceId) |
This function demonstrates the usage of the Axi Ethernet by sending and receiving frames in polled mode. More... | |
int | AxiEthernetSingleFramePolledExample (void) |
This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in polled mode. More... | |
int | AxiEthernetMultipleFramesPolledExample (void) |
This example uses polled mode to queue up multiple frames in the packet FIFOs before sending them in a single burst. More... | |
int | AxiEthernetPollForTxStatus (void) |
This functions 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) |
This functions 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) |
This function resets the device but preserves the options set by the user. More... | |
int | main (void) |
This is the main function for the AxiEthernet example. More... | |
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.
None. |
References AxiEthernetPollForRxStatus(), AxiEthernetPollForTxStatus(), AxiEthernetResetDevice(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetPolledExample().
int AxiEthernetPolledExample | ( | u16 | AxiEthernetDeviceId, |
u16 | FifoDeviceId | ||
) |
This function demonstrates the usage of the Axi Ethernet by sending and receiving frames in polled mode.
AxiEthernetDeviceId | is device ID of the AxiEthernet Device , typically XPAR_<AXIETHERNET_instance>_DEVICE_ID value from xparameters.h |
FifoDeviceId | is device ID of the Fifo device taken from xparameters.h |
References XAxiEthernet_Config::AxiDevBaseAddress, XAxiEthernet_Config::AxiDevType, AxiEthernetMultipleFramesPolledExample(), AxiEthernetSingleFramePolledExample(), AxiEthernetUtilEnterLoopback(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilPhyDelay(), XAxiEthernet_Config::BaseAddress, XAxiEthernet_CfgInitialize(), XAxiEthernet_GetPhysicalInterface, XAxiEthernet_LookupConfig(), XAxiEthernet_SetMacAddress(), and XAxiEthernet_SetOperatingSpeed().
Referenced by main().
int AxiEthernetPollForRxStatus | ( | void | ) |
This functions 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, handle all the possible error conditions.
None. |
References AxiEthernetResetDevice(), AxiEthernetUtilErrorTrap(), XAE_INT_RXFIFOOVR_MASK, XAE_INT_RXRJECT_MASK, and XAxiEthernet_GetIntStatus.
Referenced by AxiEthernetMultipleFramesPolledExample(), and AxiEthernetSingleFramePolledExample().
int AxiEthernetPollForTxStatus | ( | void | ) |
This functions 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.
None. |
References AxiEthernetResetDevice(), and AxiEthernetUtilErrorTrap().
Referenced by AxiEthernetMultipleFramesPolledExample(), and AxiEthernetSingleFramePolledExample().
int AxiEthernetResetDevice | ( | void | ) |
This function resets the device but preserves the options set by the user.
None. |
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 AxiEthernetSingleFramePolledExample | ( | void | ) |
This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in polled mode.
None. |
References AxiEthernetPollForRxStatus(), AxiEthernetPollForTxStatus(), AxiEthernetUtilErrorTrap(), AxiEthernetUtilFrameHdrFormatMAC(), AxiEthernetUtilFrameHdrFormatType(), AxiEthernetUtilFrameMemClear(), AxiEthernetUtilFrameSetPayloadData(), AxiEthernetUtilFrameVerify(), XAxiEthernet_Start(), and XAxiEthernet_Stop().
Referenced by AxiEthernetPolledExample().
int main | ( | void | ) |
This is the main function for the AxiEthernet example.
This function is not included if the example is generated from the TestAppGen test tool.
None. |
References AXIETHERNET_DEVICE_ID, AxiEthernetPolledExample(), and AxiEthernetUtilErrorTrap().