03-18-2008 12:08 PM
03-18-2008 05:54 PM - edited 03-18-2008 05:55 PM
However, we use the DMA FIFO to transfer data between the target and the Host over the PCI bus. That means, when you are using a cRIO Architecture, between the FPGA and the Real-Time Controller.
In your
case, you try to communicate directly between the FPGA and the Windows host
using the DMA FIFO method. THAT’S NOT POSSIBLE. You must
mode the Host VI under the cRIO in your project.
Best
regards
Nick_CH
03-19-2008 04:13 AM
Dear Nick,
Thank you for your response.
My application is develloped on the compact rio, but after this application will be used between an Host and a Digital R Series Intelligent DAQ Devices.
If I developped the application on a cRIO (data transfer between FPGA and RT target=host VI ), can I after used the same application with an R series (data transfer between FPGA and "Windows My computer"=host VI)?
Regards
Julien
03-19-2008 05:53 AM
Dear Julien,
Your are able to develop your application with the CompactRIO and then to reuse the code for your R-Series Target. A tutorial can help you to do it: How Can I Move my FPGA Application to a New Target?
However that means also that you must recompile your code for the R-Series.
BE CAREFUL: Several problems can occur when transferring code to the new target. It is possible that the new FPGA Target does not support the I/O resource, does not support the clock resource, does not support the FPGA FIFO or does not FPGA Memory.
With my personal experience, I never have problem with reusing one code on a new FPGA Target.
Best regards,
Nick_CH
03-19-2008 03:42 PM - edited 03-19-2008 03:44 PM
On the FPGA, you write to the DMA FIFO with timeout of 0. When you do this, you should handle the overflow case. This is especially true inside the single-cycle loop. The project you posted attempts to push data faster than the PCI bus is capable of carrying! (40Mhz * 4 bytes = 160MB/s, verses PCI maximum throughput of 133MB/s) You are likely overflowing the FIFO and losing data for that reason. A simple fix would be to build a counter that increments only when the FIFO write node didn't timeout.I'd also like to clarify something from Nick_CH's post: It is possible to communicate with a DMA FPGA FIFO from a remote host, just like in Massif's example. Behind the scenes, we take care of DMA'ing data to the controller, and then transferring the data over the network. We do this so that an application written under "My Computer" can be moved to an RT controller with no code changes. It doesn't behave the same of course. It uses the network and so isn't deterministic and has much lower throughput.
On the host, I noticed that you "configure" the FIFO after data has started flowing. This is entirely legal, but it would be better to do the configure before data is flowing to get the most reliable results, especially when you have an application that is sensitive to overflow!
03-19-2008 04:36 PM
03-20-2008 04:09 AM
Hi Captain!
Many thanks for your help. Theses informations are very important for my project.