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: 

Cluster coercion for FPGA references

Solved!
Go to solution

I have a cluster of clusters.  One of the inner clusters grew from 25 to 29 elements, but I forgot to update several of my subVI's to reflect.  I seem to remember previously when I did this, I got a broken line and non executable VI, but now it results in a coercion.  Can you really coerce a cluster with more elements into a cluster with fewer elements?  My outer cluster consists of a couple of FPGA references that have register clusters. 

0 Kudos
Message 1 of 6
(3,041 Views)

You are correct that two clusters must have the same number of elements and their elements must each in pair be coercible for a coercion dot. Otherwise the wire should break. If you can upload a simple example showing the invalid coercion that would be helpful.

Message 2 of 6
(3,040 Views)

Unfortunately I had already corrected the coercion that I was having by the time I posted this, but if it happens again, I will be sure to post a screenshot of it happening.  It's a little bit time consuming to reproduce though, just because of  the compilation time on the FPGA.  Thank you for the response though.

0 Kudos
Message 3 of 6
(3,010 Views)

I just had the problem pop up again.  I've attached a couple of screenshots.  In the first, you can see the VI that I'm getting the coercion in, and the second screenshot shows a comparison of the two clusters.  The clusters were large,  so you can only see about half of what's in there, but the included half shows where the problem occurs.  The the reference called "FPGA 2 Reference" is supposed to match up to "FPGA VI Reference Out".  Directly underneath each of those references are the register clusters.  One register has 9 elements while the other has only 8.  I feel like this should cause a break.

Download All
0 Kudos
Message 4 of 6
(3,004 Views)
Solution
Accepted by topic author adams156

Hi Adams,

 

FPGA Reference Out is of the special data type "FPGA Reference Dynamic", which dynamically includes a cluster of the Registers, Elements, and FIFO's associated with the referenced FPGA personality. Dynamic data types don't follow the same rules of coercion that we would expect a statically defined data type to follow. The dynamic nature of FPGA Reference wires allow us to wire any FPGA Reference into the input of any read/write control, regardless of if the read/write control was created explicility for the FPGA Reference. This makes programming in FPGA much more convenient.

Joey S.
Senior Product Manager, Software
National Instruments
Message 5 of 6
(2,981 Views)

Just to extend on what Joey said ... The FPGA references show their context help similar to a cluster, but they aren't clusters. Rather, the view is trying to show the configuration of the reference. When you see a coercion of a reference, it means the references you are passing in has more functionality than what the function needs but it is still compatible.

Message 6 of 6
(2,962 Views)