LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flatten floating point on FPGA for multichannel DMA

Hi,

 

We have a large FPGA application on a cRIO with 3 DMAs and are trying to transfer mutliple channels of data through a target-to-host DMA.  We have a large variety of types (U8 to floating point) to support but I can't seem to find a way to flatten (extract the bytes of) the floating point quantities to stuff into the DMA.  I don't want to use a second DMA. 

 

Any tips?

 

thanks,

 

Steve

0 Kudos
Message 1 of 17
(4,061 Views)

You should be able to build them into a cluster and pass the cluster through the DMA.

0 Kudos
Message 2 of 17
(4,042 Views)

Hmm, doesn't look like DMA FIFOs allow cluster data types.

 

Even if they did, that probably wouldn't work for our situation.  We have multiple loops of different (and sometimes varying) rates writing different data types to the DMA so clusters don't fit well.  

 

We're currently using cluster indicators, and they get flattened/unflatted by LabView to pass to the RT layer (as described here).   We're running out of gates and want a more robust design so we're switching to DMAs.  I wish I had access to the flattening code/node!

 

Steve

 

 

0 Kudos
Message 3 of 17
(4,033 Views)
0 Kudos
Message 4 of 17
(4,027 Views)

That page is very misleading.

 

FIFOs which are FPGA-FPGA (On the same card) can have custom controls, FPGA to host or host to FPGA cannot support custom controls.

 

That much I know.

 

Shane

0 Kudos
Message 5 of 17
(4,024 Views)

Clusters are supported on target-scoped FIFOs, but not DMA FIFOs

 

From that page:  "Note  DMA and peer-to-peer FIFOs do not support custom data types."

 

I actually verified this in FPGA 2013 before responding to your first post ...

 

Thanks for replies, though.

 

Steve

 

 

0 Kudos
Message 6 of 17
(4,021 Views)

Hmm, I didn't see the note.  It's right beside larger Bold text and the other text kind of steals the eye away.....

0 Kudos
Message 7 of 17
(4,019 Views)

Can you use typecast to turn the datatype into an I64?

0 Kudos
Message 8 of 17
(4,014 Views)

Don't want to convert to integer (changes the value).  I just want to take the 4 bytes in an SGL (or two bytes of a U16, etc.) and send them through the DMA as U8s.  

 

Steve

0 Kudos
Message 9 of 17
(4,004 Views)

No.  Typecast it to an integer.  Send through the DMA.  Typecast back to the original datatype on the other side.  It won't change the value.

0 Kudos
Message 10 of 17
(4,000 Views)