05-22-2012 04:14 PM
I am trying to learn FPGA. I have a few simple question.
1. I tried to use the configure open FPGA VI reference. I selected the bit file on my PC, and I checked the Run the FPGA VI option. Why am I selecting the bit file on my PC? Isn't the bit file supposed to be on my FPGA target?
2. After I open a FPGA VI reference, I fed it to an invoke node, but it will not take it. It says that the source and sink have different data type, but it also says that they are both FPGA interface. I am a little confused.
Please see attached picture.
Solved! Go to Solution.
05-22-2012 05:17 PM
jyang72211 wrote:
1. I tried to use the configure open FPGA VI reference. I selected the bit file on my PC, and I checked the Run the FPGA VI option. Why am I selecting the bit file on my PC? Isn't the bit file supposed to be on my FPGA target?
Not quite sure what you're asking here. An FPGA target doesn't have any local storage. When you open the FPGA VI Reference, LabVIEW loads the bitfile onto the FPGA. The VI that calls Open FPGA VI Reference is the one that opens the bitfile, so the bitfile needs to be local to that VI (in this case, on your PC).
@jyang72211 wrote:
2. After I open a FPGA VI reference, I fed it to an invoke node, but it will not take it. It says that the source and sink have different data type, but it also says that they are both FPGA interface. I am a little confused.
The FPGA Reference on the front panel needs to match the configuration of the reference you're passing to it. Right-click the front-panel control and configure the FPGA Reference to point at the same bitfile that you open. Better than that, bind the Open FPGA VI Reference to a Type Definition, and place that type definition on the subVI front panel. Note that if you do this, it functions backwards from what you might expect. Updating the Open FPGA VI reference configuration modifies the type definition; you never edit the type definition directly.
05-23-2012 09:28 AM
Thanks! I have a few more questions.
1. Thanks for clarifying. I didn't know that the bit file is loaded duing the execuation of the program when open FPGA VI reference is called. My learning begins ....
2. When I looked at how the exe was compiled, I saw that the bit file was not compiled with the exe. If 1 is true, howcome the bit file was not compiled with the exe?
3. I bound the open FPGA VI reference to a type def. It worked. However, I am not sure what you meant by "functioning backwards than I expect". If I want to update the bit file, I just open the type def to make the change, and the change would propagate to all VI used, isn't it true?
4. I noticed that when I put a read/write control on my VI, LabVIEW will look for a few controls. After I told LabVIEW where to find the conrols, it will continue to ask me over and over again. Why is that?
05-23-2012 09:45 AM
One more question.
If I open multiple FPGA references and dont' close them until the very end, is that ok? Or do I have to open and close everytime I use them? i am planing to use the saem host vi with two different FPGA references for two different FPGA targets.
05-23-2012 01:17 PM
@jyang72211 wrote:
2. When I looked at how the exe was compiled, I saw that the bit file was not compiled with the exe. If 1 is true, howcome the bit file was not compiled with the exe?
The bitfile referenced by Open FPGA VI is embedded into the exe when you compile, it is not a separate file. Within the executable, Open FPGA VI uses that embedded bitfile; it will not load an external bitfile. If you try building an executable without first compiling the bitfile, I'm not sure what happens - most likely it will compile but you'll get an error when you run it.
@jyang72211 wrote:
3. I bound the open FPGA VI reference to a type def. It worked. However, I am not sure what you meant by "functioning backwards than I expect". If I want to update the bit file, I just open the type def to make the change, and the change would propagate to all VI used, isn't it true?
No, that's what I meant about it being backwards. DO NOT edit the type definition. Update the configuration of Open FPGA VI, and that will automatically update the bound type definition.
@jyang72211 wrote:
4. I noticed that when I put a read/write control on my VI, LabVIEW will look for a few controls. After I told LabVIEW where to find the conrols, it will continue to ask me over and over again. Why is that?
You're going to have to be more specific. Which controls? Sounds like your FPGA toolkit installation is incomplete. It's possible this is something that could be fixed by a mass compile.
jyang72211 wrote:
If I open multiple FPGA references and dont' close them until the very end, is that ok? Or do I have to open and close everytime I use them? i am planing to use the saem host vi with two different FPGA references for two different FPGA targets.
You should only open one reference per FPGA target at a time. If you're using two FPGAs then it is reasonable to keep one reference to each FPGA.
05-23-2012 01:23 PM
Is the bit file going to be complied into the exe even though when this action is not specified in the exe setup?
When I click on the read/write control option, it searches for the controls of my fpga vi. I guess it is trying to find what options I have, but I don't understand why it would search everytime when I click on the control?
05-23-2012 01:38 PM
Yes, the bitfile referenced by Open FPGA VI Ref will always be embedded in the executable. You do not need to include it in the build spec, if that's what you mean by "specified in the exe setup."
The search behavior you describe isn't normal, but I'm still not clear what it's searching for. Are these type definitions? Are you referencing a bitfile or the FPGA VI?
05-24-2012 08:37 AM
It is ssearching for type definiation in the FPGA VI.
05-24-2012 11:47 AM
Again, is your Open FPGA VI Ref referring to the FPGA VI, or the bitfile? Are the type definitions part of your LabVIEW project? If the host and FPGA share type definitions, you may need to add them under the host target as well as the FPGA target.
05-24-2012 02:54 PM
The Open FPGA VI Ref refers to the bit file. Are you saying that it would refer to a FPGA Vi as well? Can you explain why would you refer to a FPGA VI in open FPGA VI ref?
The type defs are part of my project.
Right now, I am opening a lvbit file and not lvbitx file. The lvbit file was compiled years ago, and now I am trying ot use it in LabVIEW 2011. Would that be a problem?