![]() |
llfifo
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XStrm_RxFifoStreamer |
| Defines the receive byte-streamer instance. More... | |
| struct | XStrm_TxFifoStreamer |
| Defines the transmit byte-streamer instance. More... | |
Macros | |
| #define | FIFO_WIDTH_BYTES 4 |
| FIFO keyhole width in bytes. More... | |
| #define | XLlFifo_ReadReg(BaseAddress, RegOffset) (Xil_In32((BaseAddress) + (RegOffset))) |
| Reads an XLlFifo register value. More... | |
| #define | XLlFifo_WriteReg(BaseAddress, RegOffset, Value) ((Xil_Out32((BaseAddress) + (RegOffset), (Value)))) |
| Writes an XLlFifo register value. More... | |
| #define | min(x, y) (((x) < (y)) ? (x) : (y)) |
| Returns the smaller of two values. More... | |
| #define | LARGEST_FIFO_KEYHOLE_SIZE_WORDS 4 |
| FIFO keyhole size in 32-bit words. More... | |
| #define | XStrm_TxVacancy(InstancePtr) |
| Returns transmit vacancy in 32-bit words. More... | |
| #define | XStrm_RxOccupancy(InstancePtr) |
| Returns receive occupancy in 32-bit words. More... | |
| #define | XStrm_IsRxInternalEmpty(InstancePtr) (((InstancePtr)->FrmByteCnt == 0) ? TRUE : FALSE) |
| Reports whether the streamer holding buffer is empty. More... | |
Typedefs | |
| typedef struct XStrm_RxFifoStreamer | XStrm_RxFifoStreamer |
| Defines the receive byte-streamer instance. More... | |
| typedef struct XStrm_TxFifoStreamer | XStrm_TxFifoStreamer |
| Defines the transmit byte-streamer instance. More... | |
Functions | |
| u32 | XLlFifo_iRxOccupancy (XLlFifo *InstancePtr) |
| Returns receive occupancy in 32-bit words. More... | |
| u32 | XLlFifo_iRxGetLen (XLlFifo *InstancePtr) |
| Returns the next receive frame length in bytes. More... | |
| int | XLlFifo_iRead_Aligned (XLlFifo *InstancePtr, void *BufPtr, unsigned WordCount) |
| Reads aligned 32-bit words from the receive FIFO. More... | |
| u32 | XLlFifo_iTxVacancy (XLlFifo *InstancePtr) |
| Returns transmit vacancy in 32-bit words. More... | |
| void | XLlFifo_iTxSetLen (XLlFifo *InstancePtr, u32 Bytes) |
| Starts a transmit of the given byte length. More... | |
| int | XLlFifo_iWrite_Aligned (XLlFifo *InstancePtr, void *BufPtr, unsigned WordCount) |
| Writes aligned 32-bit words to the transmit FIFO. More... | |
| int | XLlFifo_CfgInitialize (XLlFifo *InstancePtr, XLlFifo_Config *Config, UINTPTR EffectiveAddress) |
| Initializes the XLlFifo driver from a config. More... | |
| u32 | XLlFifo_RxGetWord (XLlFifo *InstancePtr) |
| Reads one 32-bit word from the receive FIFO. More... | |
| void | XLlFifo_TxPutWord (XLlFifo *InstancePtr, u32 Word) |
| Writes one 32-bit word to the transmit FIFO. More... | |
| void | XLlFifo_Initialize (XLlFifo *InstancePtr, UINTPTR BaseAddress) |
| Initializes the XLlFifo driver from a base address. More... | |
| XLlFifo_Config * | XLlFfio_LookupConfig (UINTPTR BaseAddress) |
| Looks up the XLlFifo configuration. More... | |
| void | XStrm_RxInitialize (XStrm_RxFifoStreamer *InstancePtr, unsigned FifoWidth, void *FifoInstance, XStrm_XferFnType ReadFn, XStrm_GetLenFnType GetLenFn, XStrm_GetOccupancyFnType GetOccupancyFn) |
| Initializes a receive byte-streamer instance. More... | |
| void | XStrm_TxInitialize (XStrm_TxFifoStreamer *InstancePtr, unsigned FifoWidth, void *FifoInstance, XStrm_XferFnType WriteFn, XStrm_SetLenFnType SetLenFn, XStrm_GetVacancyFnType GetVacancyFn) |
| Initializes a transmit byte-streamer instance. More... | |
| u32 | XStrm_RxGetLen (XStrm_RxFifoStreamer *InstancePtr) |
| Returns the next receive frame length in bytes. More... | |
| void | XStrm_Read (XStrm_RxFifoStreamer *InstancePtr, void *BufPtr, unsigned Bytes) |
| Reads bytes from the receive streamer. More... | |
| void | XStrm_TxSetLen (XStrm_TxFifoStreamer *InstancePtr, u32 Bytes) |
| Flushes the streamer and starts a transmit. More... | |
| void | XStrm_Write (XStrm_TxFifoStreamer *InstancePtr, void *BufPtr, unsigned Bytes) |
| Writes bytes to the transmit streamer. More... | |
Registers | |
| #define | XLLF_ISR_OFFSET 0x00000000 |
| Interrupt Status. More... | |
| #define | XLLF_IER_OFFSET 0x00000004 |
| Interrupt Enable. More... | |
| #define | XLLF_TDFR_OFFSET 0x00000008 |
| Transmit Reset. More... | |
| #define | XLLF_TDFV_OFFSET 0x0000000c |
| Transmit Vacancy. More... | |
| #define | XLLF_TDFD_OFFSET 0x00000010 |
| Transmit Data. More... | |
| #define | XLLF_AXI4_TDFD_OFFSET 0x00000000 |
| Axi4 Transmit Data. More... | |
| #define | XLLF_TLF_OFFSET 0x00000014 |
| Transmit Length. More... | |
| #define | XLLF_RDFR_OFFSET 0x00000018 |
| Receive Reset. More... | |
| #define | XLLF_RDFO_OFFSET 0x0000001c |
| Receive Occupancy. More... | |
| #define | XLLF_RDFD_OFFSET 0x00000020 |
| Receive Data. More... | |
| #define | XLLF_AXI4_RDFD_OFFSET 0x00001000 |
| Axi4 Receive Data. More... | |
| #define | XLLF_RLF_OFFSET 0x00000024 |
| Receive Length. More... | |
| #define | XLLF_LLR_OFFSET 0x00000028 |
| Local Link Reset. More... | |
| #define | XLLF_TDR_OFFSET 0x0000002C |
| Transmit Destination. More... | |
| #define | XLLF_RDR_OFFSET 0x00000030 |
| Receive Destination. More... | |
Interrupt bits | |
These bits are associated with the XLLF_IER_OFFSET and XLLF_ISR_OFFSET registers. | |
| #define | XLLF_INT_RPURE_MASK 0x80000000 |
| Receive under-read. More... | |
| #define | XLLF_INT_RPORE_MASK 0x40000000 |
| Receive over-read. More... | |
| #define | XLLF_INT_RPUE_MASK 0x20000000 |
| Receive underrun (empty) More... | |
| #define | XLLF_INT_TPOE_MASK 0x10000000 |
| Transmit overrun. More... | |
| #define | XLLF_INT_TC_MASK 0x08000000 |
| Transmit complete. More... | |
| #define | XLLF_INT_RC_MASK 0x04000000 |
| Receive complete. More... | |
| #define | XLLF_INT_TSE_MASK 0x02000000 |
| Transmit length mismatch. More... | |
| #define | XLLF_INT_TRC_MASK 0x01000000 |
| Transmit reset complete. More... | |
| #define | XLLF_INT_RRC_MASK 0x00800000 |
| Receive reset complete. More... | |
| #define | XLLF_INT_TFPF_MASK 0x00400000 |
| Tx FIFO Programmable Full, AXI FIFO MM2S Only. More... | |
| #define | XLLF_INT_TFPE_MASK 0x00200000 |
| Tx FIFO Programmable Empty AXI FIFO MM2S Only. More... | |
| #define | XLLF_INT_RFPF_MASK 0x00100000 |
| Rx FIFO Programmable Full AXI FIFO MM2S Only. More... | |
| #define | XLLF_INT_RFPE_MASK 0x00080000 |
| Rx FIFO Programmable Empty AXI FIFO MM2S Only. More... | |
| #define | XLLF_INT_ALL_MASK 0xfff80000 |
| All the ints. More... | |
| #define | XLLF_INT_ERROR_MASK 0xf2000000 |
| Error status ints. More... | |
| #define | XLLF_INT_RXERROR_MASK 0xe0000000 |
| Receive Error status ints. More... | |
| #define | XLLF_INT_TXERROR_MASK 0x12000000 |
| Transmit Error status ints. More... | |
Reset register values | |
These bits are associated with the XLLF_TDFR_OFFSET and XLLF_RDFR_OFFSET reset registers. | |
| #define | XLLF_RDFR_RESET_MASK 0x000000a5 |
| receive reset value More... | |
| #define | XLLF_TDFR_RESET_MASK 0x000000a5 |
| Transmit reset value. More... | |
| #define | XLLF_LLR_RESET_MASK 0x000000a5 |
| Local Link reset value. More... | |
Debug register helpers | |
| #define | XLlFifo_reg_name(RegOffset) |
| Returns a debug name string for an XLlFifo register offset. More... | |
| #define | XLlFifo_print_reg_o(BaseAddress, RegOffset, Value) |
| Prints an XLlFifo register write in debug builds. More... | |
| #define | XLlFifo_print_reg_i(BaseAddress, RegOffset, Value) |
| Prints an XLlFifo register read in debug builds. More... | |
| #define FIFO_WIDTH_BYTES 4 |
FIFO keyhole width in bytes.
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| #define LARGEST_FIFO_KEYHOLE_SIZE_WORDS 4 |
FIFO keyhole size in 32-bit words.
| #define min | ( | x, | |
| y | |||
| ) | (((x) < (y)) ? (x) : (y)) |
Returns the smaller of two values.
Referenced by XStrm_Read(), and XStrm_Write().
| #define XLLF_AXI4_RDFD_OFFSET 0x00001000 |
Axi4 Receive Data.
Referenced by XLlFifo_RxGetWord().
| #define XLLF_AXI4_TDFD_OFFSET 0x00000000 |
Axi4 Transmit Data.
Referenced by XLlFifo_TxPutWord().
| #define XLLF_IER_OFFSET 0x00000004 |
Interrupt Enable.
| #define XLLF_INT_ALL_MASK 0xfff80000 |
All the ints.
Referenced by XLlFifoInterruptExample().
| #define XLLF_INT_ERROR_MASK 0xf2000000 |
Error status ints.
| #define XLLF_INT_RC_MASK 0x04000000 |
Receive complete.
| #define XLLF_INT_RFPE_MASK 0x00080000 |
Rx FIFO Programmable Empty AXI FIFO MM2S Only.
| #define XLLF_INT_RFPF_MASK 0x00100000 |
Rx FIFO Programmable Full AXI FIFO MM2S Only.
| #define XLLF_INT_RPORE_MASK 0x40000000 |
Receive over-read.
| #define XLLF_INT_RPUE_MASK 0x20000000 |
Receive underrun (empty)
| #define XLLF_INT_RPURE_MASK 0x80000000 |
Receive under-read.
| #define XLLF_INT_RRC_MASK 0x00800000 |
Receive reset complete.
| #define XLLF_INT_RXERROR_MASK 0xe0000000 |
Receive Error status ints.
| #define XLLF_INT_TC_MASK 0x08000000 |
Transmit complete.
| #define XLLF_INT_TFPE_MASK 0x00200000 |
Tx FIFO Programmable Empty AXI FIFO MM2S Only.
| #define XLLF_INT_TFPF_MASK 0x00400000 |
Tx FIFO Programmable Full, AXI FIFO MM2S Only.
| #define XLLF_INT_TPOE_MASK 0x10000000 |
Transmit overrun.
| #define XLLF_INT_TRC_MASK 0x01000000 |
Transmit reset complete.
| #define XLLF_INT_TSE_MASK 0x02000000 |
Transmit length mismatch.
| #define XLLF_INT_TXERROR_MASK 0x12000000 |
Transmit Error status ints.
| #define XLLF_ISR_OFFSET 0x00000000 |
Interrupt Status.
| #define XLLF_LLR_OFFSET 0x00000028 |
Local Link Reset.
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| #define XLLF_LLR_RESET_MASK 0x000000a5 |
Local Link reset value.
| #define XLLF_RDFD_OFFSET 0x00000020 |
Receive Data.
Referenced by XLlFifo_RxGetWord().
| #define XLLF_RDFO_OFFSET 0x0000001c |
Receive Occupancy.
Referenced by XLlFifo_iRxOccupancy().
| #define XLLF_RDFR_OFFSET 0x00000018 |
Receive Reset.
| #define XLLF_RDFR_RESET_MASK 0x000000a5 |
receive reset value
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| #define XLLF_RDR_OFFSET 0x00000030 |
Receive Destination.
| #define XLLF_RLF_OFFSET 0x00000024 |
Receive Length.
Referenced by XLlFifo_iRxGetLen().
| #define XLLF_TDFD_OFFSET 0x00000010 |
Transmit Data.
Referenced by XLlFifo_TxPutWord().
| #define XLLF_TDFR_OFFSET 0x00000008 |
Transmit Reset.
| #define XLLF_TDFR_RESET_MASK 0x000000a5 |
Transmit reset value.
| #define XLLF_TDFV_OFFSET 0x0000000c |
Transmit Vacancy.
Referenced by XLlFifo_iTxVacancy().
| #define XLLF_TDR_OFFSET 0x0000002C |
Transmit Destination.
| #define XLLF_TLF_OFFSET 0x00000014 |
Transmit Length.
Referenced by XLlFifo_iTxSetLen().
| #define XLlFifo_print_reg_i | ( | BaseAddress, | |
| RegOffset, | |||
| Value | |||
| ) |
Prints an XLlFifo register read in debug builds.
| [in] | BaseAddress | Device base address. |
| [in] | RegOffset | FIFO register offset. |
| [in] | Value | Value that was read. |
| #define XLlFifo_print_reg_o | ( | BaseAddress, | |
| RegOffset, | |||
| Value | |||
| ) |
Prints an XLlFifo register write in debug builds.
| [in] | BaseAddress | Device base address. |
| [in] | RegOffset | FIFO register offset. |
| [in] | Value | Value being written. |
| #define XLlFifo_ReadReg | ( | BaseAddress, | |
| RegOffset | |||
| ) | (Xil_In32((BaseAddress) + (RegOffset))) |
Reads an XLlFifo register value.
XLlFifo_ReadReg returns the value of the register at the offset, RegOffset, from the memory mapped base address, BaseAddress.
| [in] | BaseAddress | Specifies the base address of the device. |
| [in] | RegOffset | Specifies the offset from BaseAddress. |
Referenced by XLlFifo_iRxGetLen(), XLlFifo_iRxOccupancy(), XLlFifo_iTxVacancy(), and XLlFifo_RxGetWord().
| #define XLlFifo_reg_name | ( | RegOffset | ) |
Returns a debug name string for an XLlFifo register offset.
| [in] | RegOffset | FIFO register offset. |
| #define XLlFifo_WriteReg | ( | BaseAddress, | |
| RegOffset, | |||
| Value | |||
| ) | ((Xil_Out32((BaseAddress) + (RegOffset), (Value)))) |
Writes an XLlFifo register value.
XLlFifo_WriteReg writes the value, Value, to the register at the offset, RegOffset, from the memory mapped base address, BaseAddress.
| [in] | BaseAddress | Specifies the base address of the device. |
| [in] | RegOffset | Specifies the offset from BaseAddress. |
| [in] | Value | Value to write to the register. |
Referenced by XLlFifo_CfgInitialize(), XLlFifo_Initialize(), XLlFifo_iTxSetLen(), and XLlFifo_TxPutWord().
| #define XStrm_IsRxInternalEmpty | ( | InstancePtr | ) | (((InstancePtr)->FrmByteCnt == 0) ? TRUE : FALSE) |
Reports whether the streamer holding buffer is empty.
XStrm_IsRxInternalEmpty returns true if the streamer, specified by InstancePtr, is not holding any bytes in it's internal buffers. Note that this routine does not reflect information about the state of the FIFO used by this streamer.
| [in] | InstancePtr | References the streamer on which to operate. |
| #define XStrm_RxOccupancy | ( | InstancePtr | ) |
Returns receive occupancy in 32-bit words.
XStrm_RxOccupancy returns the number of 32-bit words available (occupancy) to be read from the streamer, specified by InstancePtr, and FIFO this steamer is using.
| [in] | InstancePtr | References the streamer on which to operate. |
The amount of bytes in the holding buffer (rounded up to whole 32-bit words) is added to the occupancy value of FIFO this streamer is using. This is to ensure the caller gets a little more accurate occupancy value.
| #define XStrm_TxVacancy | ( | InstancePtr | ) |
Returns transmit vacancy in 32-bit words.
XStrm_TxVacancy returns the number of unused 32-bit words available (vacancy) between the streamer, specified by InstancePtr, and the FIFO this streamer is using.
| [in] | InstancePtr | References the streamer on which to operate. |
The amount of bytes in the holding buffer (rounded up to whole 32-bit words) is subtracted from the vacancy value of FIFO this streamer is using. This is to ensure the caller can write the number words given in the return value and not overflow the FIFO.
| typedef struct XStrm_RxFifoStreamer XStrm_RxFifoStreamer |
Defines the receive byte-streamer instance.
This typedef defines a run-time instance of a receive byte-streamer.
| typedef struct XStrm_TxFifoStreamer XStrm_TxFifoStreamer |
Defines the transmit byte-streamer instance.
This typedef defines a run-time instance of a transmit byte-streamer.
| XLlFifo_Config* XLlFfio_LookupConfig | ( | UINTPTR | BaseAddress | ) |
Looks up the XLlFifo configuration.
Looks up the device configuration based on the unique device ID/BaseAddress. The XLlFifo_ConfigTable[] contains the configuration info for each device in the system.
| [in] | BaseAddress | Contains the base address of the device. |
References XLlFifo_Config::Name.
Referenced by XLlFifoInterruptExample(), and XLlFifoPollingExample().
| int XLlFifo_CfgInitialize | ( | XLlFifo * | InstancePtr, |
| XLlFifo_Config * | Config, | ||
| UINTPTR | EffectiveAddress | ||
| ) |
Initializes the XLlFifo driver from a config.
XLlFifo_CfgInitialize initializes an XPS_ll_Fifo device along with the InstancePtr that references it.
| [out] | InstancePtr | Pointer to the AXI Streaming FIFO instance to be worked on. |
| [in] | Config | Hardware configuration for the core. |
| [in] | EffectiveAddress | Device base address in the virtual memory address space. The caller must keep the mapping from EffectiveAddr to the physical base address unchanged after this call. If address translation is not used, pass Config->BaseAddress as the physical address. |
References XLlFifo::Axi4BaseAddress, XLlFifo_Config::Axi4BaseAddress, XLlFifo::BaseAddress, XLlFifo::Datainterface, XLlFifo_Config::Datainterface, FIFO_WIDTH_BYTES, XLlFifo::IntId, XLlFifo_Config::IntId, XLlFifo::IntrParent, XLlFifo_Config::IntrParent, XLlFifo::IsReady, XLlFifo::RxStreamer, XLlFifo::TxStreamer, XLLF_LLR_OFFSET, XLLF_RDFR_RESET_MASK, XLlFifo_iRead_Aligned(), XLlFifo_iRxGetLen(), XLlFifo_iRxOccupancy(), XLlFifo_iTxSetLen(), XLlFifo_iTxVacancy(), XLlFifo_iWrite_Aligned(), XLlFifo_RxReset, XLlFifo_TxReset, XLlFifo_WriteReg, XStrm_RxInitialize(), and XStrm_TxInitialize().
Referenced by XLlFifoInterruptExample(), and XLlFifoPollingExample().
| void XLlFifo_Initialize | ( | XLlFifo * | InstancePtr, |
| UINTPTR | BaseAddress | ||
| ) |
Initializes the XLlFifo driver from a base address.
XLlFifo_Initialize initializes an XPS_ll_Fifo device along with the InstancePtr that references it.
| [out] | InstancePtr | References the memory instance to be associated with the FIFO device upon initialization. |
| [in] | BaseAddress | Processor address used to access the base address of the Fifo device. |
References XLlFifo::Axi4BaseAddress, XLlFifo::BaseAddress, FIFO_WIDTH_BYTES, XLlFifo::IsReady, XLlFifo::RxStreamer, XLlFifo::TxStreamer, XLLF_LLR_OFFSET, XLLF_RDFR_RESET_MASK, XLlFifo_iRead_Aligned(), XLlFifo_iRxGetLen(), XLlFifo_iRxOccupancy(), XLlFifo_iTxSetLen(), XLlFifo_iTxVacancy(), XLlFifo_iWrite_Aligned(), XLlFifo_RxReset, XLlFifo_TxReset, XLlFifo_WriteReg, XStrm_RxInitialize(), and XStrm_TxInitialize().
| int XLlFifo_iRead_Aligned | ( | XLlFifo * | InstancePtr, |
| void * | BufPtr, | ||
| unsigned | WordCount | ||
| ) |
Reads aligned 32-bit words from the receive FIFO.
XLlFifo_iRead_Aligned reads WordCount words from the FIFO referenced by InstancePtr to the block of memory referenced by BufPtr.
XLlFifo_iRead_Aligned assumes that BufPtr is already aligned according to the following hardware limitations: ppc - aligned on 32 bit boundaries to avoid performance penalties from unaligned exception handling. microblaze - aligned on 32 bit boundaries as microblaze does not handle unaligned transfers.
Care must be taken to ensure that the number of words read with one or more calls to XLlFifo_Read() does not exceed the number of bytes (rounded up to the nearest whole 32 bit word) available given from the last call to XLlFifo_RxGetLen().
| [in] | InstancePtr | References the FIFO on which to operate. |
| [out] | BufPtr | Specifies the memory address to place the data read. |
| [in] | WordCount | Specifies the number of 32 bit words to read. |
References XLlFifo_RxGetWord().
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| u32 XLlFifo_iRxGetLen | ( | XLlFifo * | InstancePtr | ) |
Returns the next receive frame length in bytes.
XLlFifo_iRxGetLen notifies the hardware that the program is ready to receive the next frame from the receive channel of the FIFO specified by InstancePtr.
Note that the program must first call XLlFifo_iRxGetLen before pulling data out of the receive channel of the FIFO with XLlFifo_Read.
| [in] | InstancePtr | References the FIFO on which to operate. |
References XLlFifo::BaseAddress, XLLF_RLF_OFFSET, and XLlFifo_ReadReg.
Referenced by RxReceive(), XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| u32 XLlFifo_iRxOccupancy | ( | XLlFifo * | InstancePtr | ) |
Returns receive occupancy in 32-bit words.
XLlFifo_iRxOccupancy returns the number of 32-bit words available (occupancy) to be read from the receive channel of the FIFO, specified by InstancePtr.
| [in] | InstancePtr | References the FIFO on which to operate. |
References XLlFifo::BaseAddress, XLLF_RDFO_OFFSET, and XLlFifo_ReadReg.
Referenced by RxReceive(), XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| void XLlFifo_iTxSetLen | ( | XLlFifo * | InstancePtr, |
| u32 | Bytes | ||
| ) |
Starts a transmit of the given byte length.
XLlFifo_iTxSetLen begins a hardware transfer of data out of the transmit channel of the FIFO specified by InstancePtr. Bytes specifies the number of bytes in the frame to transmit.
Note that Bytes (rounded up to the nearest whole 32-bit word) must match the number of words just written using one or more calls to XLlFifo_iWrite_Aligned().
| [in] | InstancePtr | References the FIFO on which to operate. |
| [in] | Bytes | Specifies the number of bytes to transmit. |
References XLlFifo::BaseAddress, XLLF_TLF_OFFSET, and XLlFifo_WriteReg.
Referenced by TxSend(), XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| u32 XLlFifo_iTxVacancy | ( | XLlFifo * | InstancePtr | ) |
Returns transmit vacancy in 32-bit words.
XLlFifo_iTxVacancy returns the number of unused 32 bit words available (vacancy) in the send channel of the FIFO, specified by InstancePtr.
| [in] | InstancePtr | References the FIFO on which to operate. |
References XLlFifo::BaseAddress, XLLF_TDFV_OFFSET, and XLlFifo_ReadReg.
Referenced by TxSend(), XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| int XLlFifo_iWrite_Aligned | ( | XLlFifo * | InstancePtr, |
| void * | BufPtr, | ||
| unsigned | WordCount | ||
| ) |
Writes aligned 32-bit words to the transmit FIFO.
XLlFifo_iWrite_Aligned writes WordCount words to the FIFO referenced by InstancePtr from the block of memory referenced by BufPtr.
XLlFifo_iWrite_Aligned assumes that BufPtr is already aligned according to the following hardware limitations: ppc - aligned on 32 bit boundaries to avoid performance penalties from unaligned exception handling. microblaze - aligned on 32 bit boundaries as microblaze does not handle unaligned transfers.
Care must be taken to ensure that the number of words written with one or more calls to XLlFifo_iWrite_Aligned() matches the number of bytes (rounded up to the nearest whole 32 bit word) given in the next call to XLlFifo_iTxSetLen().
| [in] | InstancePtr | References the FIFO on which to operate. |
| [in] | BufPtr | Specifies the memory address of the data to write. |
| [in] | WordCount | Specifies the number of 32-bit words to write. |
References XLlFifo_TxPutWord().
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| u32 XLlFifo_RxGetWord | ( | XLlFifo * | InstancePtr | ) |
Reads one 32-bit word from the receive FIFO.
XLlFifo_RxGetWord reads one 32 bit word from the FIFO specified by InstancePtr.
XLlFifo_RxGetLen or XLlFifo_iRxGetLen must be called before calling XLlFifo_RxGetWord. Otherwise, the hardware raises an Over Read Exception.
| [in] | InstancePtr | References the FIFO on which to operate. |
References XLlFifo::Datainterface, XLLF_AXI4_RDFD_OFFSET, XLLF_RDFD_OFFSET, and XLlFifo_ReadReg.
Referenced by RxReceive(), and XLlFifo_iRead_Aligned().
| void XLlFifo_TxPutWord | ( | XLlFifo * | InstancePtr, |
| u32 | Word | ||
| ) |
Writes one 32-bit word to the transmit FIFO.
XLlFifo_TxPutWord writes the 32 bit word, Word to the FIFO specified by InstancePtr.
| [in] | InstancePtr | References the FIFO on which to operate. |
| [in] | Word | Data word to be written to FIFO. |
References XLlFifo::Datainterface, XLLF_AXI4_TDFD_OFFSET, XLLF_TDFD_OFFSET, and XLlFifo_WriteReg.
Referenced by TxSend(), and XLlFifo_iWrite_Aligned().
| void XStrm_Read | ( | XStrm_RxFifoStreamer * | InstancePtr, |
| void * | BufPtr, | ||
| unsigned | Bytes | ||
| ) |
Reads bytes from the receive streamer.
XStrm_Read reads Bytes bytes from the FIFO specified by InstancePtr to the block of memory, referenced by BufPtr.
Care must be taken to ensure that the number of bytes read with one or more calls to XStrm_Read() does not exceed the number of bytes available given from the last call to XStrm_RxGetLen().
| [in,out] | InstancePtr | References the FIFO on which to operate. |
| [out] | BufPtr | Specifies the memory address to place the data read. |
| [in] | Bytes | Specifies the number of bytes to read. |
References XStrm_RxFifoStreamer::AlignedBuffer, XStrm_RxFifoStreamer::FifoInstance, XStrm_RxFifoStreamer::FifoWidth, XStrm_RxFifoStreamer::FrmByteCnt, XStrm_RxFifoStreamer::HeadIndex, min, and XStrm_RxFifoStreamer::ReadFn.
| u32 XStrm_RxGetLen | ( | XStrm_RxFifoStreamer * | InstancePtr | ) |
Returns the next receive frame length in bytes.
XStrm_RxGetLen notifies the hardware that the program is ready to receive the next frame from the receive channel of the FIFO, specified by InstancePtr.
Note that the program must first call XStrm_RxGetLen before pulling data out of the receive channel of the FIFO with XStrm_Read.
| [in,out] | InstancePtr | References the FIFO on which to operate. |
References XStrm_RxFifoStreamer::FifoInstance, XStrm_RxFifoStreamer::FifoWidth, XStrm_RxFifoStreamer::FrmByteCnt, XStrm_RxFifoStreamer::GetLenFn, and XStrm_RxFifoStreamer::HeadIndex.
| void XStrm_RxInitialize | ( | XStrm_RxFifoStreamer * | InstancePtr, |
| unsigned | FifoWidth, | ||
| void * | FifoInstance, | ||
| XStrm_XferFnType | ReadFn, | ||
| XStrm_GetLenFnType | GetLenFn, | ||
| XStrm_GetOccupancyFnType | GetOccupancyFn | ||
| ) |
Initializes a receive byte-streamer instance.
XStrm_RxInitialize initializes the XStrm_RxFifoStreamer object referenced by InstancePtr.
| [out] | InstancePtr | References the receive streamer to initialize. |
| [in] | FifoWidth | Specifies the FIFO keyhole size in bytes. |
| [in] | FifoInstance | FIFO driver instance this streamer uses to transfer data into the actual FIFO. |
| [in] | ReadFn | Reads data from the FIFO. The routine must handle only aligned buffers. |
| [in] | GetLenFn | Starts a receive on the actual FIFO. |
| [in] | GetOccupancyFn | Returns occupancy of the actual FIFO. The true occupancy comes through this streamer because it holds some of the bytes. |
References XStrm_RxFifoStreamer::FifoInstance, FifoInstance, XStrm_RxFifoStreamer::FifoWidth, XStrm_RxFifoStreamer::GetLenFn, XStrm_RxFifoStreamer::GetOccupancyFn, XStrm_RxFifoStreamer::HeadIndex, and XStrm_RxFifoStreamer::ReadFn.
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| void XStrm_TxInitialize | ( | XStrm_TxFifoStreamer * | InstancePtr, |
| unsigned | FifoWidth, | ||
| void * | FifoInstance, | ||
| XStrm_XferFnType | WriteFn, | ||
| XStrm_SetLenFnType | SetLenFn, | ||
| XStrm_GetVacancyFnType | GetVacancyFn | ||
| ) |
Initializes a transmit byte-streamer instance.
XStrm_TxInitialize initializes the XStrm_TxFifoStreamer object referenced by InstancePtr.
| [out] | InstancePtr | References the transmit streamer to initialize. |
| [in] | FifoWidth | Specifies the FIFO keyhole size in bytes. |
| [in] | FifoInstance | FIFO driver instance this streamer uses to transfer data into the actual FIFO. |
| [in] | WriteFn | Writes data into the FIFO. The routine must handle only aligned buffers. |
| [in] | SetLenFn | Starts a transmit on the actual FIFO. |
| [in] | GetVacancyFn | Returns vacancy of the actual FIFO. The true vacancy comes through this streamer because it holds some of the bytes. |
References FifoInstance, XStrm_TxFifoStreamer::FifoInstance, XStrm_TxFifoStreamer::FifoWidth, XStrm_TxFifoStreamer::GetVacancyFn, XStrm_TxFifoStreamer::SetLenFn, XStrm_TxFifoStreamer::TailIndex, and XStrm_TxFifoStreamer::WriteFn.
Referenced by XLlFifo_CfgInitialize(), and XLlFifo_Initialize().
| void XStrm_TxSetLen | ( | XStrm_TxFifoStreamer * | InstancePtr, |
| u32 | Bytes | ||
| ) |
Flushes the streamer and starts a transmit.
XStrm_TxSetLen flushes to the FIFO, specified by InstancePtr, any bytes remaining in internal buffers and begins a hardware transfer of data out of the transmit channel of the FIFO. Bytes specifies the number of bytes in the frame to transmit.
| [in,out] | InstancePtr | References the FIFO Streamer on which to operate. |
| [in] | Bytes | Specifies the frame length in bytes. |
References XStrm_TxFifoStreamer::AlignedBuffer, XStrm_TxFifoStreamer::FifoInstance, XStrm_TxFifoStreamer::TailIndex, and XStrm_TxFifoStreamer::WriteFn.
| void XStrm_Write | ( | XStrm_TxFifoStreamer * | InstancePtr, |
| void * | BufPtr, | ||
| unsigned | Bytes | ||
| ) |
Writes bytes to the transmit streamer.
XStrm_Write writes Bytes bytes of the block of memory, referenced by BufPtr, to the transmit channel of the FIFO referenced by InstancePtr.
Care must be taken to ensure that the number of bytes written with one or more calls to XStrm_Write() matches the number of bytes given in the next call to XStrm_TxSetLen().
| [in,out] | InstancePtr | References the FIFO on which to operate. |
| [in] | BufPtr | Specifies the memory address of data to write. |
| [in] | Bytes | Specifies the number of bytes to write. |
References XStrm_TxFifoStreamer::AlignedBuffer, XStrm_TxFifoStreamer::FifoInstance, XStrm_TxFifoStreamer::FifoWidth, min, XStrm_TxFifoStreamer::TailIndex, and XStrm_TxFifoStreamer::WriteFn.