emacps
Vitis Drivers API Documentation
xemacps_bd.h File Reference

Macros

#define XEmacPs_BdClear(BdPtr)   memset((BdPtr), 0, sizeof(XEmacPs_Bd))
 Zero out BD fields. More...
 
#define XEmacPs_BdRead(BaseAddress, Offset)   (*(u32 *)((UINTPTR)((void*)(BaseAddress)) + (u32)(Offset)))
 Read the given Buffer Descriptor word. More...
 
#define XEmacPs_BdWrite(BaseAddress, Offset, Data)   (*(u32 *)((UINTPTR)(void*)(BaseAddress) + (u32)(Offset)) = (u32)(Data))
 Write the given Buffer Descriptor word. More...
 
#define XEmacPs_BdSetAddressTx(BdPtr, Addr)   XEmacPs_BdWrite((BdPtr), XEMACPS_BD_ADDR_OFFSET, (u32)(Addr))
 Set the BD's Address field (word 0). More...
 
#define XEmacPs_BdSetAddressRx(BdPtr, Addr)
 Set the BD's Address field (word 0). More...
 
#define XEmacPs_BdSetStatus(BdPtr, Data)
 Set the BD's Status field (word 1). More...
 
#define XEmacPs_BdGetStatus(BdPtr)   XEmacPs_BdRead((BdPtr), XEMACPS_BD_STAT_OFFSET)
 Retrieve the BD's Packet DMA transfer status word (word 1). More...
 
#define XEmacPs_BdGetBufAddr(BdPtr)   (XEmacPs_BdRead((BdPtr), XEMACPS_BD_ADDR_OFFSET))
 Get the address (bits 0..31) of the BD's buffer address (word 0) More...
 
#define XEmacPs_BdSetLength(BdPtr, LenBytes)
 Set transfer length in bytes for the given BD. More...
 
#define XEmacPs_BdGetLength(BdPtr)
 Retrieve the BD length field. More...
 
#define XEmacPs_GetRxFrameSize(InstancePtr, BdPtr)
 Retrieve the RX frame size. More...
 
#define XEmacPs_BdIsLast(BdPtr)
 Test whether the given BD has been marked as the last BD of a packet. More...
 
#define XEmacPs_BdSetLast(BdPtr)
 Tell the DMA engine that the given transmit BD marks the end of the current packet to be processed. More...
 
#define XEmacPs_BdClearLast(BdPtr)
 Tell the DMA engine that the current packet does not end with the given BD. More...
 
#define XEmacPs_BdIsRxWrap(BdPtr)
 Set this bit to mark the last descriptor in the receive buffer descriptor list. More...
 
#define XEmacPs_BdIsTxWrap(BdPtr)
 Sets this bit to mark the last descriptor in the transmit buffer descriptor list. More...
 
#define XEmacPs_BdIsRxNew(BdPtr)
 Determine the new bit of the receive BD. More...
 
#define XEmacPs_BdSetTxUsed(BdPtr)
 Software sets this bit to disable the buffer to be read by the hardware. More...
 
#define XEmacPs_BdClearTxUsed(BdPtr)
 Software clears this bit to enable the buffer to be read by the hardware. More...
 
#define XEmacPs_BdIsTxUsed(BdPtr)
 Determine the used bit of the transmit BD. More...
 
#define XEmacPs_BdIsTxRetry(BdPtr)
 Determine if a frame fails to be transmitted due to too many retries. More...
 
#define XEmacPs_BdIsTxUrun(BdPtr)
 Determine if a frame fails to be transmitted due to data can not be feteched in time or buffers are exhausted. More...
 
#define XEmacPs_BdIsTxExh(BdPtr)
 Determine if a frame fails to be transmitted due to buffer is exhausted mid-frame. More...
 
#define XEmacPs_BdSetTxNoCRC(BdPtr)
 Sets this bit, no CRC will be appended to the current frame. More...
 
#define XEmacPs_BdClearTxNoCRC(BdPtr)
 Clear this bit, CRC will be appended to the current frame. More...
 
#define XEmacPs_BdIsRxBcast(BdPtr)
 Determine the broadcast bit of the receive BD. More...
 
#define XEmacPs_BdIsRxMultiHash(BdPtr)
 Determine the multicast hash bit of the receive BD. More...
 
#define XEmacPs_BdIsRxUniHash(BdPtr)
 Determine the unicast hash bit of the receive BD. More...
 
#define XEmacPs_BdIsRxVlan(BdPtr)
 Determine if the received frame is a VLAN Tagged frame. More...
 
#define XEmacPs_BdIsRxPri(BdPtr)
 Determine if the received frame has Type ID of 8100h and null VLAN identifier(Priority tag). More...
 
#define XEmacPs_BdIsRxCFI(BdPtr)
 Determine if the received frame's Concatenation Format Indicator (CFI) of the frames VLANTCI field was set. More...
 
#define XEmacPs_BdIsRxEOF(BdPtr)
 Determine the End Of Frame (EOF) bit of the receive BD. More...
 
#define XEmacPs_BdIsRxSOF(BdPtr)
 Determine the Start Of Frame (SOF) bit of the receive BD. More...
 

Typedefs

typedef u32 XEmacPs_Bd [XEMACPS_BD_NUM_WORDS]
 The XEmacPs_Bd is the type for buffer descriptors (BDs). More...