10-29-2015 02:30 PM - edited 10-29-2015 02:57 PM
As the title states, I tried to run "FFT Co-processor" example found in LabVIEW 2013 FlexRIO examples with PXI-7954R FPGA but kept getting "ERROR -50400 occurred at Invoke Method: FIFO.Write in FFT Co-processor (Host).vi. Possible reason(s): The transfer did not complete within the timeout period or within the specific number of retries.".
I am using LabVIEW 2013 SP1 with Xilinx 14.4 Compiler. I didn't modify the code except copied the FPGA vi to the newly added PXI-7954R target and recompiled it; and change the FPGA VI Reference in the host vi accordingly.
I tested the code in simulation mode (i.e., execute FPGA VI on Development Computer with Simulated I/O) and it worked fine. However when running on FPGA Target it doesn't work. I monitored the "Empty Elements Remaining" on "Host-to-FPGA.Write" in the host vi and the value was 5. And "Elements Remaining" in "FPGA-to-Host.Read" in the host vi was 0.
Does it have something to do with the FIFO buffer size? Any suggestions/comments are greatly appreciated.
Thanks,
Bing
Solved! Go to Solution.
10-29-2015 04:19 PM
Update: The same code runs fine on PCIe-7842R. I am really confused as 7842R and 7954R both use Virtex-5 FPGA chip and their performance should be similar. Only difference I can think of is 7954R sits inside PXIe-1073 chassis which has up to 250MB/s bandwidth while 7842R is directly inserted to the PCIe slot inside the host PC.
10-29-2015 04:30 PM
If you post your code i can help you rule out any obvious msitakes
10-29-2015 04:50 PM
Hi David-A,
Thanks for offering help. The code is attached. It was directly copied from \LabVIEW 2013\examples\FlexRIO\FPGA Fundamentals\Co-processor\FFT. I only added two indicators to monitor Element Remaining and Empty Element Remaining. Also I mentioned above, the same code works on PCIe-7842R.
Thanks,
Bing
10-29-2015 10:22 PM
Hi David-A,
I just tested the code on LabVIEW 2014 SP1 with Xilinx 14.7 complier. Same as LV2013, the same code runs fine on PCIe-7842R but still NOT working on PXI-7954R. I might be wrong but it seems the code is not compatible with PXI-7954R somehow, regardless of LabVIEW version or complier version.
I also tried the CLIP Adder and Floating Point Multiply found in NI examples and they all work fine with 7954R. So I have no idea why the FIFO example doesn't work.
10-30-2015 01:53 PM
Theres a race condition in the host code. If you try to read before you write then the FIFO times out. If you make sure that you write before you read then the timeout never occurs.
Attached is a version of the host code that writes then reads using a state machine.
10-30-2015 02:12 PM
Hi David-A,
Your code works on 7954R! Thank you so much for your help.
One more question: why does the race condition only occur on 7954R? I tried the orignal code dozens of times on 7842R and it always works.
Thanks,
Bing
10-30-2015 02:19 PM
The timeout occured on all flexrio devices i tested it on, not just the 7954. What I'm not sure about is why this previously working example consistently doesn't work now. This race condition was always there, but apparently the stars had aligned and all previous testing and even now on the R series device you tested it with the write loop executes before the read loop and the race condition never mannifests. Using a state machine instead of two seperate while loops completely eliminates the race condition.
10-30-2015 02:37 PM
@David-A wrote:
The timeout occured on all flexrio devices i tested it on, not just the 7954. What I'm not sure about is why this previously working example consistently doesn't work now. This race condition was always there, but apparently the stars had aligned and all previous testing and even now on the R series device you tested it with the write loop executes before the read loop and the race condition never mannifests. Using a state machine instead of two seperate while loops completely eliminates the race condition.
That's good to know, as I was worried that something was wrong with our FlexRIO FPGA card or the chassis
Thanks again for your help!