Jump to content

DMA HOST TO FPGA


Polintel

Recommended Posts

Use the DMA to transfer a array data from the RT system to the FPGA,and indicate the array data in the FGPA.

Now,If the array data in the RT is a array including one element ,Ican recevie well in the FPGA VI,bcause in the FPGA VI the function of DMA Read only accept the single element,you can not put a array indication .But I want to transfer a array including many elements.How can i do?

Link to comment
  • 4 months later...

The FPGA can only complete one read per clock cycle. The only thing to do is read from in a loop that iterates N times and have the tunnel build the array.

Any loop will work the For loop lends itself best to this sort of thing.

The array size must be constant, if you are trying to read different sized arrays some elegance will be needed when you self build the array.

Link to comment

QUOTE (Adrenaline @ Jul 14 2008, 10:03 AM)

The FPGA can only complete one read per clock cycle. The only thing to do is read from in a loop that iterates N times and have the tunnel build the array.

Any loop will work, but the For loop lends itself best to this sort of thing.

The array size must be constant size, if you are trying to read different sized arrays some elegance will be needed when you self build the array.

Because of the limitation that the array must be a constant size, you are much more limited as to how you can build an array on FPGA. For example you can not use Build Array to iteratively build up an array (as it dynamically changes the size of the array, which is not allowed). Also you can not use the Autoindexing function on the tunnel of a While loop. It will only work with a For loop that is set to iterate a constant number of times. One common approach is to allocate the array outside of the loop as a constant, pass it to a Shift Register on the loop, and use Replace Array Subset inside the loop to replace the default array elements with the actual data.

In general you should not build large arrays on the FPGA as they use up a lot of FPGA space and your design may not fit on the FPGA. Programming on FPGA does require a slightly different approach or mindset from RT or Windows.

Polintel,

What do you intend to do with the data on the FPGA? You can store larger data sets in a memory block or FIFO on the FPGA without using up FPGA space. (Memory blocks and FIFOs use RAM that is separate from the FPGA.) You can pass data from the DMA Read directly to a memory block or FIFO, one point at a time, without building up an array in the FPGA.

If all you will be doing is to stream the data from DMA to an analog output, you won't need to do anything else as the DMA implementation includes a FIFO on the FPGA, which buffers the data.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.