LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Speed up usb transfer with Spartan 3E

Hello! I am new to LabView programming and interaction with fpga borads so I have not mastered the secrets yet. As a student working on a project involving communication between a host computer and a Spartan 3E board, I have found the capabilities of LabView and the NI fpga driver very appealing and powerful. I am trying to design an algorithm processing image data onto the fpga borad which in its turn has to receive, process and send the data back to the host machine. The problem lies in the fact that communication through reading or writing indicators and controls is a slow method. I have read about using DMA FIFOs for that purpose but unfortunately there is no such functionality enabled for the Spartan 3E board. The code in the fpga chip executes inside a single cycle timed loop and it seems to me that the main problem lies in the fact that data transfer is accomplished using controls and indicators. Communication is done via usb using the provided Xilinx cable driver. I would be grateful if you suggest ways to speed up the transfer or changing the method I am using. My university does not have other types of fpga boards and for that reason I am limited to that specific Xilinx board.

Thanks in advance!

0 Kudos
Message 1 of 6
(3,813 Views)

Hi Firewalker,

 

If I'm not mistaken, you are looking for fast way how to exchange larger data between host PC nad FPGA. 

 

I would say first, that it is important to understand FPGA fundamentals. Your code basicaly represents physical connections done in your gate array. FPGA is intended to perform high-speed, higly deterministic and parallel operations.If you are doing processing of the data received on digital inputs, and sending processed data via digital inputs, everythink should be pretty fast.

 

If you need to interface your FPGA with software, the best way how to pass data is to use DMA FIFO. I don't know how fast is this communication via USB, but to use DMA FIFO, both Hardware and Driver has to support it (first check if they do).

 

In LabVIEW Example Finder, you can find couple of examples on how to use FIFO.Run LabVIEW Example Finder and navigate to Toolkits and Modules -> FPGA -> R-Series -> FPGA Fundamentals -> DMA to find examples which could help you.

 

Refer to "Creating FPGA FIFOs (FPGA Module)" help file for more informatio on how to create and how to use DMA FIFO. There are some interesting Knowledgebase and Tutorials which can guide you though fundamentals. I believe that Help for LabVIEW FPGA modul is one of the best in terms of information included. 

 

 

 

I hope information was useful and I hope it will help you to continue with your project.

 

Best regards,

Martin

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 2 of 6
(3,771 Views)

You are correct - the USB interface to the Spartan 3E Starter Board does not support DMA data transfer.

 

You can buffer data using memory or fifo's within the FPGA, however this will only help if all of your data will fit in the FPGA memory.  This will not help if you are continuously streaming data.

 

Note - DMA is supported on PXI and PCI LV FPGA targets, like the PCI-7811.

0 Kudos
Message 3 of 6
(3,758 Views)

Hello, again!

Thanks for the fast response! Perhaps I will concentrate on changing the interface. Initially I thought that the allowed usb transfer opens great capabilities in terms of transfer speed but obviously this is not the case with Spartan 3E and its integration with LabView. Apart from this, I have two more questions towards you.

The first regards the inbuilt 512 Mbit (32M x 16) DDR SDRAM memory. Is it possible to refer to that memory from LabView or I have to implement the controller logic? As far as I know there exists an IP core developed by Xilinx and designed to be used in cooperation with the MicroBlaze processor but this idea is a bit far from the convenience of using the LabView platform.

The second question is related to the Ethernet interface. Is it possible to establish Ethernet communication between the host PC and the FPGA target using LabView and the already mentioned FPGA driver? I have tried searching for information about that topic but with no success for the time being.

Thanks once again for the attention! This forum is really extremely useful.

 

0 Kudos
Message 4 of 6
(3,718 Views)

Hello,

 

 

  My question is related to the Ethernet interface. Is it possible to establish Ethernet communication between the host PC and the FPGA target using LabView and the already mentioned FPGA driver? I have tried searching for information about that topic but with no success for the time being.

 

 

Thanks for the attention.

0 Kudos
Message 5 of 6
(3,334 Views)

As far as i know Spartan 3e driver does not allow to use Ethernet port.

Smiley Sad

SS_Hunter
0 Kudos
Message 6 of 6
(2,207 Views)