From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create something like a library file for FPGA registers?

Solved!
Go to solution

It would be nice if FPGA registers could be saved to a library file (or something like it) in the same way that can be done for shared variables and other objects.  This would help a lot with version control and with sharing common registers between projects (rather than manually recreating them each time).

 

I'm wondering if there's a way of doing this already that I'm just unaware of?

0 Kudos
Message 1 of 5
(892 Views)

Hi riplakish,

 


@riplakish wrote:

I'm wondering if there's a way of doing this already that I'm just unaware of?


Have you tried to create/handle those registers programmatically?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(886 Views)

Hi GerdW,

 

Thanks for the reply.  I've used register method nodes and reference constants to programmatically handle registers before, but I don't know how to programmatically create registers, unless you're talking about a VI-defined register.  I've not used those, but my understanding was that their scope is restricted to the VI in which they are defined, which doesn't really serve the purpose that I'm looking for here.

 

Let me know if I'm mistaken or you have other insight.

 

Regards,

riplakish 

0 Kudos
Message 3 of 5
(837 Views)
Solution
Accepted by topic author riplakish

You can pass a VI-Defined Register as a parameter to any other VI.

 

Same goes for DMA FIFOs By the way.

Message 4 of 5
(830 Views)

Hi Intaris,

 

Thanks for the suggestion.  I did some playing around with VI-Defined Registers, and I think implemented what you're proposing.  I defined the register in a subVI, passed the reference out, and then used it in two parallel loops (see image below).  Code works as expected, so I guess this is a usable approach.  I'd just define all the registers that I wanted to share with other projects in a subVI, cluster the references, and pass that cluster around to where they're needed.

 

My only issue with it is that it creates the need to run a bunch of wires around, which I don't love, but maybe there's a way around that that I'm not thinking of.  That plus all the extra effort involved, really makes me wish they just had some kind of library file.

riplakish_0-1660159289951.png

 

0 Kudos
Message 5 of 5
(814 Views)