Quantcast
Channel: PXI topics
Viewing all articles
Browse latest Browse all 3417

NIFPGA Python Library FIFO Read/Write Flow Control

$
0
0

I'm trying to use the nifpga library to read and write to the FIFO on an NI FPGA (PXIe-7856). The size of the data I am working with is 32 elements, and every time I change the input values (lets call this n), the size of the FIFO grows by 32 elements, which mean I need to read the fifo n times to get the new data. I need the FIFO to always contain the newest data in the first 32 elements (limit the size of the fifo to 32 elements and over write this every time there is new data so each read gets the current data). I think I have found a solution for this: turn off flow control (defined in screenshot). Except I can't figure out how to use this method without error. The closest I've gotten is by:

flowcontrol = FlowControl(1)

self.read_fifo_object = self.session.fifos['DMA_READ']

self.read_fifo_object.flow_control(flowcontrol)

which gives me the error in the terminal screenshot.

Does anyone know how to instantiate this method without error or another solution to this problem?

The source code for the flow_control method can be found here https://nifpga-python.readthedocs.io/en/latest/_modules/nifpga/status.html and the FlowControl class is defined in nifpga.py as show in the last screenshot.

 

Viewing all articles
Browse latest Browse all 3417


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>