LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA difference between pack cluster vs unpack cluster

Solved!
Go to solution

Hello Community, 

 

I used FPGA C API generator to export a header file, but it didn't show any message about the function called

 

(FPGA VI NAME)_IndiciatorCluster_UnpackCluster

 

(FPGA VI NAME)_IndiciatorCluster_PackCluster

 

what would those functions do and how would they be different?

 

0 Kudos
Message 1 of 2
(1,260 Views)
Solution
Accepted by topic author cshim31

When a cluster is instantiated on the FPGA it is "packed".  There are no padding bits because alignment doesn't matter on the FPGA.

 

We choose to represent clusters in C as structs.  Structs are padded and alignment of members can differ on different architectures.

 

The unpack and pack functions let you convert between the FPGA representation and the C representation.  When reading a cluster indicator from the FPGA you'll read it as the FPGA representation and convert it to a C struct to access the data in it.

 

C -> packCluster -> FPGA 

FPGA -> unpackCluster -> C

0 Kudos
Message 2 of 2
(1,206 Views)