08-08-2022 01:08 PM
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?
Solved! Go to Solution.
08-08-2022 01:18 PM
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?
08-10-2022 10:30 AM
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
08-10-2022 11:35 AM - edited 08-10-2022 11:36 AM
You can pass a VI-Defined Register as a parameter to any other VI.
Same goes for DMA FIFOs By the way.
08-10-2022 02:37 PM
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.