05-18-2008 10:24 AM - edited 05-18-2008 10:24 AM
05-19-2008 06:00 AM
Hi Michael,
I was trying to create a program that would succesfully dynamically modify the FIFO side but I couldn't. The reason is that you are actually allocating memory on the FPGA and it cannot be done dynamically.
The obvious workaround would be to use the minimum FIFO size that would be suitable for both modes (737 in your case), is it something that would be acceptable in your application?
Regards and hope things are going well for you since the last time we met...
KostasB
NI UK Applications Engineering
05-19-2008 08:02 AM
05-19-2008 08:35 AM
Hi Michael,
This solution looks fine. You could try in the Target VI instead of using a constant as the Number of Iterations in the For Loop (which is either 100 or 737), to use a control and pass this value to the control from the Host VI by using a Write I/O node.
Let me know if that makes sense,
KostasB
NIUK Applications Engineering
05-19-2008 09:32 AM
05-19-2008 10:02 AM - edited 05-19-2008 10:03 AM
KostasB wrote:
This solution looks fine. You could try in the Target VI instead of using a constant as the Number of Iterations in the For Loop (which is either 100 or 737), to use a control and pass this value to the control from the Host VI by using a Write I/O node.

05-19-2008 10:45 AM
05-19-2008 11:15 AM - edited 05-19-2008 11:17 AM
Hi Michael,
Just to clarify things, the Configure Depth Invoke Node only configures the depth of the FIFO on the host side only. In other words, you can make the buffer size larger on the host if you want to process a chunk of data that is a different size than the depth of the FIFO on the FPGA, but Kostas is correct that the FPGA FIFO is allocated when the bitfile is loaded, so this cannot be dynamically changed. It will always be the original size that you set it to (100 elements).
I think the reason your original VI seems to hang may be that you are trying to read 737 elements at a time with the Invoke Node never timing out. Since you can only place 100 elements in the FIFO on the FPGA, it could be that you are trying to read a number of elements that is not yet available and when the VI cannot read those elements, it will not time out because of the -1 wired to Timeout parameter of the Invoke Node. If you change the Timeout value, you may not get all 737 elements, but your VI probably will not hang and you can find out how many elements you are actually receiving. If it seems like you are not getting all of your samples, you might try to implement something like what Uli suggests and read a smaller number of elements at a time to see if you can get all 737 when you need them.
05-21-2008 03:12 PM - edited 05-21-2008 03:13 PM


