Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically change FPGA programs

I have a program that needs to swap FPGA programs dynamically.  I have a subVI in the real-time that executes this function but sometimes (over 50%) receives an error -61141 which is explained as "FPGA is busy".  The error always occurs at the open reference.  I know that the current FPGA stops because I am monitoring the outputs.  Here is a link to a picture of the block diagram:

 

http://picasaweb.google.com/lh/photo/BxZp4jVinxA3lqyg4_OMzQ?feat=directlink

 

Any help is appreciated,

-Steve

0 Kudos
Message 1 of 12
(5,623 Views)
Will it help if you just increase the delay between closing the refernce and opening a new one. May be you can vary it and find an optimum delay.
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
Message 2 of 12
(5,607 Views)
That is a good suggestion, but we have tried to run this in execution highlight even with physically pausing for 5 - 10 seconds between the close and open.  This still doesn't seem to have any effect.
0 Kudos
Message 3 of 12
(5,604 Views)

Steve,

 

Which version of LV and LV FPGA are you using? What FPGA target (R series card, cRIO chassis, etc.) are you using? What host processor (PXI controller, cRIO controller, etc.) are you using?

 

 

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
Message 4 of 12
(5,594 Views)

Hi Steve,

 

I have a couple of thoughts.  First of all, are you dealing with multiple FPGA's or is this just with a single piece of hardware.  Iis the FPGA remote, or in the local system?  Also, are you dealing with any other FPGA references elsewhere in your code? Finally, is the error generated at the Open Reference, or elsewhere?

 

Try changing the Close Reference to just Close (not reset).  You can do this from the right-click menu on the Close Reference VI.

 

Brian A.
National Instruments
Applications Engineer
Message 5 of 12
(5,582 Views)

To answer Christian's questions:

 

This is hosted on a cRIO 9074; LabVIEW ver 8.6; RT ver 8.6; FPGA ver 8.6; NI RIO ver 3.0

 

To answer Brian's questions:

 

This project is a single 9074 FPGA target through a network so it is listed as a remote system.  This is the only FPGA reference in the code and the error always comes from the Open Reference VI.  For the close reference VI, I have tried both Close and Close & Reset.  In both configurations the open reference returns the error.

 

-Steve

0 Kudos
Message 6 of 12
(5,576 Views)
Hey Steve, from the block diagram you show I can't tell if you are closing the second FPGA reference you are opening? Can you verify that's the case? (sorry for asking the obvious, but sometimes obvious solutions take forever to find them :smileyvery-happy:). Also, have you tried simplifying your code to see if you can reproduce it without going through VI boundaries? Are you calling VIs by reference?
Message 7 of 12
(5,549 Views)

Obvious questions are never bad in my book. Robot Very Happy

 

Yes, if the user switches back to the record the second ref is closed.  There is also a close in the exit case.  This VI is not dynamically called, it is a regular subVI.  At one point early in development this was not a subVI, I will try pulling that up to the top level in the RT.

 

-Steve

0 Kudos
Message 8 of 12
(5,544 Views)

Hi Steve,

 

I guess I'll jump in.  First, why are you switching FPGA files?  Have you reached the maximum size of your FPGA, or is this part of some grander scheme. I ask because the easiest solution would be to just combine the two together.

"If you want to succeed... Architect" - The Specialist
0 Kudos
Message 9 of 12
(5,528 Views)

Good question, but yes it is part of a grander scheme.  First, we are using this as a baseline architecture going ahead.  Second, I am using multiple FPGA files due to DMA limitations.  Both of my FPGA files use two DMA channels each, the maximum per FPGA is three.

 

-Steve

0 Kudos
Message 10 of 12
(5,506 Views)