xxvethernet
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
xxxvethernet.h File Reference
#include "sleep.h"
#include "xenv.h"
#include "xstatus.h"
#include "xil_assert.h"
#include "xxxvethernet_hw.h"

Data Structures

struct  XXxvEthernet_Config
 Holds configuration information for an Xxv Ethernet device. More...
 
struct  XXxvEthernet
 Holds Xxv Ethernet driver instance data. More...
 

Macros

#define XXXVETHERNET_H
 Include guard for the XXV Ethernet driver header. More...
 
#define XXE_MAC_ADDR_SIZE   6
 MAC address size in bytes. More...
 
#define XXE_MTU   1500
 Maximum MTU size of an Ethernet frame. More...
 
#define XXE_JUMBO_MTU   8982
 Maximum MTU size of a jumbo Ethernet frame. More...
 
#define XXE_HDR_SIZE   14
 Size of an Ethernet header in bytes. More...
 
#define XXE_TRL_SIZE   4
 Size of an Ethernet trailer (FCS) in bytes. More...
 
#define XXE_MAX_FRAME_SIZE   (XXE_MTU + XXE_HDR_SIZE + XXE_TRL_SIZE)
 Maximum standard Ethernet frame size. More...
 
#define XXE_MAX_JUMBO_FRAME_SIZE   (XXE_JUMBO_MTU + XXE_HDR_SIZE + XXE_TRL_SIZE)
 Maximum jumbo Ethernet frame size. More...
 
#define XXE_RX   1
 Receive direction. More...
 
#define XXE_TX   2
 Transmit direction. More...
 
#define RATE_10M   10
 10 Mbps line rate. More...
 
#define RATE_100M   100
 100 Mbps line rate. More...
 
#define RATE_1G   1000
 1 Gbps line rate. More...
 
#define RATE_2G5   2500
 2.5 Gbps line rate. More...
 
#define RATE_10G   10000
 10 Gbps line rate. More...
 
#define XXxvEthernet_IsStarted(InstancePtr)   (((InstancePtr)->IsStarted == XIL_COMPONENT_IS_STARTED) ? TRUE : FALSE)
 XXxvEthernet_IsStarted reports if the device is in the started or stopped state. More...
 
#define XXxvEthernet_XxvDevBaseAddress(InstancePtr)   ((InstancePtr)->Config.XxvDevBaseAddress)
 XXxvEthernet_XxvDevBaseAddress reports the base address of the core connected to the Xxv Ethernet's Axi4 Stream interface (expected to be MCDMA). More...
 
#define XXxvEthernet_IsTxErr(InstancePtr)
 XXxvEthernet_IsTxErr determines if there is any TX error reported by device. More...
 
#define XXxvEthernet_IsRxErr(InstancePtr)
 XXxvEthernet_IsRxErr determines if there is any RX error reported by device. More...
 
#define XXxvEthernet_GetStatus(InstancePtr)   XXxvEthernet_ReadReg((InstancePtr)->Config.BaseAddress, XXE_SR_OFFSET)
 XXxvEthernet_GetStatus returns the contents of status register. More...
 
#define XXxvEthernet_IsStatsConfigured(InstancePtr)   (((InstancePtr)->Config.Stats) ? TRUE : FALSE)
 XXxvEthernet_IsStatsConfigured returns determines if Statistics gathering. More...
 
#define XXxvEthernet_UsxgmiiLinkSts(InstancePtr)
 XXxvEthernet_UsxgmiiLinkSts returns the USXGMII link status. More...
 
#define XXxvEthernet_SetUsxgmiiAnEnable(InstancePtr)
 XXxvEthernet_SetUsxgmiiAnEnable enables USXGMII autonegotiation. More...
 
#define XXxvEthernet_SetUsxgmiiAnBypass(InstancePtr)
 XXxvEthernet_SetUsxgmiiAnBypass bypasses USXGMII autonegotiation. More...
 
#define XXxvEthernet_GetUsxgmiiAnSts(InstancePtr)
 XXxvEthernet_GetUsxgmiiAnSts returns the contents of USXGMII autonegotiation status register. More...
 
#define XXxvEthernet_IsMcDma(InstancePtr)   (((InstancePtr)->Config.XxvDevType == XPAR_MCDMA) ? TRUE: FALSE)
 XXxvEthernet_IsMcDma reports if the device is currently connected to MCDMA. More...
 
Configuration options

The following are device configuration options.

See the XXxvEthernet_SetOptions, XXxvEthernet_ClearOptions and XXxvEthernet_GetOptions routines for information on how to use options.

The default state of the options are also noted below.

#define XXE_FCS_STRIP_OPTION   0x00000010
 Strips FCS and PAD from received frames. More...
 
#define XXE_FCS_INSERT_OPTION   0x00000020
 Generates FCS and adds PAD for outgoing frames. More...
 
#define XXE_TRANSMITTER_ENABLE_OPTION   0x00000080
 Enables the Xxv Ethernet device transmitter. More...
 
#define XXE_RECEIVER_ENABLE_OPTION   0x00000100
 Enables the Xxv Ethernet device receiver. More...
 
#define XXE_DEFAULT_OPTIONS
 Default options applied in XXxvEthernet_Reset() and XXxvEthernet_CfgInitialize(). More...
 

Typedefs

typedef struct XXxvEthernet_Config XXxvEthernet_Config
 Holds configuration information for an Xxv Ethernet device. More...
 
typedef struct XXxvEthernet XXxvEthernet
 Holds Xxv Ethernet driver instance data. More...
 

Functions

int XXxvEthernet_CfgInitialize (XXxvEthernet *InstancePtr, XXxvEthernet_Config *CfgPtr, UINTPTR EffectiveAddress)
 XXxvEthernet_CfgInitialize initializes an XXV Ethernet device along with the InstancePtr that references it. More...
 
int XXxvEthernet_Start (XXxvEthernet *InstancePtr)
 XXxvEthernet_Start starts the Xxv Ethernet device as follows: More...
 
void XXxvEthernet_Stop (XXxvEthernet *InstancePtr)
 XXxvEthernet_Stop gracefully stops the Xxv Ethernet device by disabling the receiver. More...
 
void XXxvEthernet_Reset (XXxvEthernet *InstancePtr)
 XXxvEthernet_Reset does not perform a soft reset of the XxvEthernet core. More...
 
XXxvEthernet_Config * XXxvEthernet_LookupConfig (UINTPTR BaseAddress)
 Looks up device configuration by base address. More...
 
int XXxvEthernet_SetOptions (XXxvEthernet *InstancePtr, u32 Options)
 XXxvEthernet_SetOptions enables the options, Options for the Xxv Ethernet, specified by InstancePtr. More...
 
int XXxvEthernet_ClearOptions (XXxvEthernet *InstancePtr, u32 Options)
 XXxvEthernet_ClearOptions clears the options, Options for the Xxv Ethernet, specified by InstancePtr. More...
 
u32 XXxvEthernet_GetOptions (XXxvEthernet *InstancePtr)
 XXxvEthernet_GetOptions returns the current option settings. More...
 
u16 XXxvEthernet_GetAutoNegSpeed (XXxvEthernet *InstancePtr)
 XXxvEthernet_GetAutoNegSpeed reports the speed (only 10G supported) from the Autonegotiation status register. More...
 
int XXxvEthernet_SetAutoNegSpeed (XXxvEthernet *InstancePtr)
 XXxvEthernet_SetAutoNegSpeed sets the speed (only 10G supported) in the Autonegotiation control register. More...
 
int XXxvEthernet_SetUsxgmiiRateAndDuplex (XXxvEthernet *InstancePtr, u32 Rate, u32 SetFD)
 XXxvEthernet_SetUsxgmiiRateAndDuplex sets the speed and duplex ability in USXGMII Autonegotiation register. More...
 
void XXxvEthernet_UsxgmiiAnMainReset (XXxvEthernet *InstancePtr)
 XXxvEthernet_UsxgmiiAnMainReset sets the USXGMII AN Main reset. More...
 
void XXxvEthernet_UsxgmiiAnMainRestart (XXxvEthernet *InstancePtr)
 XXxvEthernet_UsxgmiiAnMainRestart sets the USXGMII AN Main restart. More...
 
int XXxvEthernet_Initialize (XXxvEthernet *InstancePtr, XXxvEthernet_Config *CfgPtr)
 XXxvEthernet_Initialize initializes an XXV Ethernet device along with the InstancePtr that references it. More...
 

Macro Definition Documentation

#define XXXVETHERNET_H

Include guard for the XXV Ethernet driver header.