LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a LabVIEW FPGA Project DLL to be called in Python

I need to write a simple LV program using an FPGA module and create a DLL to be called in a Python program.  Can a DLL be created with an FPGA program directly, or do I need to create an FPGA interface in LV and then create the DLL?  I am a LabVIEW user, but I don't know anything about Python.  Fortunately, I'm only responsible for the FPGA program.  Any help is appreciated.

0 Kudos
Message 1 of 2
(1,377 Views)

The FPGA code is not something that can be put in a DLL (aside from the simulation DLL that can be generated for newer FPGA targets but that DLL always executes on your host machine and only is usefull to simulate the FPGA code during debugging as it won’t run in real hardware and has no access to the IO pins in the hardware).

 

And you will also need to write an RT application that sits on the CPU where the FPGA is located and interfaces to the FPGA logic. This could be theoretically a Python program on the newer NI Linux RT targets since NI has some Python bindings for their NI RIO driver that performs the whole interfacing. But when I looked at that recently I kind of wondered about high throughput data transfer from DMA FIFOs. The Python idea of everything is an object introduces certain inefficiencies when trying to process large amounts of array data very quickly.

 

I seems unlikely to me that one could reach the same maximum speeds as with a LabVIEW or C program accessing NI RIO.

 

How you then transfer your data from the RT app to your Windows computer (you asked about a DLL!) is up to you. I usually use a custom TCP/IP protocol for that and if you want to use Python on your Windows system that’s most likely the best approach anyways.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(1,341 Views)