11-13-2007 08:48 PM
11-14-2007 08:30 AM
Hi Greg-
When FIFO Write is called it tries to push an element into the FIFO up to the amount of time specified in the timeout input. In your code, you have the timeout specified as '-1', which means try forever. When your FIFO is full and not being emptied, the FIFO Write never returns because you told it to keep trying forever. If you want a Boolean that your FIFO is full, use a timeout of 0 instead. Just note that doing so will result in dropping a element of data if the FIFO is full. As a side note, the buffer full Boolean is logically equivalent to a timeout Boolean, and in fact in LabVIEW FPGA 8.5, the buffer full Boolean's name has been changed to 'Timed Out?'.
Second question was about the unbundle creating 9 elements. I am guessing you must be using the Array to Cluster. Since Arrays can have a dynamic size, and clusters must have a fixed size, you have to specify the size of the cluster you want to create. This is done by right clicking on the Array to Cluster and selecting If you right click on the Array to Cluster and selecting Cluster size. This defaults to 9. Incidentally, you probably want to be use an index array or decimate array rather than converting to a cluster.
I hope that answers your questions - Just a couple of other notes on sizing your FIFOs. It typically isn't necessary to size your FIFO to the number of data points on your FPGA, I usually recommend leaving the default FPGA FIFO size (1024) unless you have a good reason to change it (e.g. running out of room on the FPGA) Larger doesn't hurt, and in fact gives you a little more flexibility when you have multiple DMA channels trying to write at the same time.
-Dustin
11-14-2007 11:37 AM
11-15-2007 08:27 AM
Hi Greg,
It's good to hear from you again! As for your question about using the index array versus the decimate array, I would suggest using the index array in a loop. Usually, the decimate array is used for when you are trying to get chunks, or more than one element, of an array out at a time. And if I am understanding your problem correctly, there is no need to worry about using a loop to do this. This is usually the way we do it here and recommend getting the single values out of an array. I hope this helps and feel free to post back if you have any more questions. Thanks!
11-15-2007 09:32 AM - edited 11-15-2007 09:34 AM