09-22-2013 10:43 AM
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
09-22-2013 01:12 PM
You should be able to build them into a cluster and pass the cluster through the DMA.
09-22-2013 03:01 PM
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
09-22-2013 04:00 PM
Hmmm. Then why does this say you can use clusters?
Using Custom Data Types with Register Items, Memory Items, FIFOs, and Handshake Items (FPGA Module)
09-22-2013 04:04 PM
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
09-22-2013 04:06 PM
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
09-22-2013 04:11 PM
Hmm, I didn't see the note. It's right beside larger Bold text and the other text kind of steals the eye away.....
09-22-2013 04:19 PM
Can you use typecast to turn the datatype into an I64?
09-22-2013 04:49 PM
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
09-22-2013 05:10 PM
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.