LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DMA Requested number of ele

Solved!
Go to solution

HI ,

Just a simple question about DMA channel.

When im configuring an taget to host or host to target DMA ,

Data type is U16 , and requested num of elements is 1023 .

does it mean that the whole size of the fifo is 2Kbytes , each cell of the fifo is U16 data (2 bits ) ?

what exactly is element ?

 

Thank you.

 

0 Kudos
Message 1 of 4
(2,956 Views)

Usually "element" means "the basic Unit under discussion".  If you have a device that gives you Units of a 16-bit unsigned integer, then your Unit occupies two bytes.  Note, however, the first word in this response ...

 

Bob Schor

0 Kudos
Message 2 of 4
(2,914 Views)
Solution
Accepted by topic author Cobmetal

The number of requested elements and the size of the individual FIFO reads are unrelated technically.

 

When you initialise a DMA FIFO, you can request a specific size before starting any Read operation.  This will be a multiple of the element data size (in your case 2 Bytes).  If you request a FIFO size of 8192 elements, then it will occupy 2x8192 Bytes.  Also note that LV cannot always comply with the requested number of elements, but I've never come across a case where it set a different size than I wanted.

 

LV typically defaults to one million elements for a FIFO IIRC.  Two factors are important here.

1) The size of the FIFO is required so that LV can do background transfers into a buffer, even if you're not currently reading

2) it's a good idea to have the size an integer multiple of your read size due to behaviour when overflowing the receive buffer

 

To add to the confusion, there's a Buffer size on the RT and on the FPGA side.  Both are completely independent of each other.  There's a great article on this somewhere..... HERE.

 

Edit: Clarification due to some mixing up of terms on my part.

Message 3 of 4
(2,909 Views)

@Cobmetal wrote:

 

does it mean that the whole size of the fifo is 2Kbytes , each cell of the fifo is U16 data (2 bits ) ? 


The data size of the fifo is 2Kbytes, each element of the fifo is U16 data (2 bytes (16 bits)). 

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