Get Number of Elements to Write (FIFO Method)

LabVIEW 2018 FPGA Module Help


Edition Date: March 2018
Part Number: 371599P-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 FPGA Module Help
LabVIEW 2017 FPGA Module Help
LabVIEW 2018 FPGA Module Help
LabVIEW 2019 FPGA Module Help
LabVIEW 2020 FPGA Module Help

Requires: FPGA Module

Returns the number of empty element slots available to be written to in the FPGA FIFO. You must use this node in the same clock domain as the clock domain containing the FIFO Method Node configured with the Write method.

Use the FIFO Method Node to implement this method.

Details  

FIFO In specifies the FIFO. You can wire a FIFO control, FIFO constant, VI-Defined FIFO Configuration node, or the FIFO Out terminal of another FIFO Method Node to FIFO In.
FIFO Out returns FIFO In if FIFO In is wired. Otherwise, FIFO Out returns the FIFO that you specify in the FIFO Method Node.
Number Of Elements to Write—Returns the number of empty element slots available to be written to in the FPGA FIFO. The number of elements that this method returns is less than or equal to the actual number of elements available to write to the FIFO.
Note  This method may generate different output values when executed in simulation mode versus on hardware. In simulation mode, the output value of this method is the actual number. On hardware, block memory FIFOs implemented using slice fabric control logic include an additional buffer. This additional buffer contains five elements when the FIFO reader and writer are in the same clock domain, or six elements when they are in different clock domains. On hardware, this method does not report the number of elements available in the additional buffer. If the FIFO contains less elements than the depth of the additional buffer, the output value of this method is less than the actual number of elements available to write. Otherwise, the output value of this method is the actual number.

Get Number of Elements to Write (FIFO Method) Details

You can use the following types of FIFOs in this method:

  • Target-scoped
  • VI-defined
  • DMA
  • Peer-to-peer

(Xilinx Vivado) This method does not support FIFOs with the built-in control logic.

The sum of the values returned from this method and the Get Number of Elements to Read method is less than or equal to the total number of elements in the FIFO. You can use this method to ensure that the FIFO can handle bursts of elements before the Write method times out.

Note  Within a single-cycle Timed Loop, the Get Number of Elements to Write and Get Number of Elements to Read FIFO methods will always return the number of elements available at the beginning of the cycle, prior to the occurrence of any Read or Write methods.

WAS THIS ARTICLE HELPFUL?

Not Helpful