LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Split Int into bits in LabVIEW FPGA

Solved!
Go to solution

Is there a clever way of splitting an Uint32 into 32 directly accessable bits (not an aray) in LabVIEW FPGA?

 

The only way I could come up with is the following, which is a pain write for 32bits, and seems kind of a waste og resources to store all these indexes.

.Uint32ToBits.png

 

Regards, mola

 

0 Kudos
Message 1 of 4
(2,939 Views)
Solution
Accepted by topic author mola

I figured it out. I could use clusters by right-clicking the Array to Cluster block and increase the cluster size to 32.

 

Uint32ToBits2.png

0 Kudos
Message 2 of 4
(2,936 Views)

Both methods are equally valid and consume zero resources on the FPGA. The array indices are compile-time constants that just get translated into wiring. Also, you can leave the indices unwired and they will default to the same order shown in your picture. 

 

So at the end of the day the method to use comes down to style preference.

 

Jim

Message 3 of 4
(2,918 Views)

Hi Jim

 

Thanks for mentioning that - I think I prefer the first option then.

 

/mola

0 Kudos
Message 4 of 4
(2,897 Views)