11-23-2015 12:43 AM
I am working on a crio 9067.I need to measure 3phase voltage for which I am using 9244.How do I set the timeout value of fpga fifo?what should be the guiding criteria?
11-23-2015 06:18 AM
What FIFO? Is this a DMA FIFO from the host to the FPGA? Visa versa? All inside of the FPGA? What else is the code doing where you read the FIFO? Any code you might have written will help give context as well.
11-23-2015 01:47 PM
its a dma fifo from fpga target to host. i wana knw what timeout value should be set.need some detailed explaination on why to set a particular timeout.
11-23-2015 02:05 PM
@prosenjit wrote:
its a dma fifo from fpga target to host. i wana knw what timeout value should be set.need some detailed explaination on why to set a particular timeout.
How many data (# samples) are you trying to get in a single read? How fast do you put data into your DMA? If you do that math from those, you will get an idea of how long it takes for the DMA to fill up that many samples. The point of a timeout, generally, is to flag when something is really wrong. So use something like 2x to 5x that time calculated earlier or something like 10 seconds.
But do know that a DMA FIFO Read uses a polling mechanism. This means that it will actually use an entire processor core checking to see if enough data is there. So in this case, you might actually want to use a loop to check the number of samples are in the FIFO (read 0 elements) and if enough data is there, read the data you want. If not, wait some time and try again. Throw an error if you loop too many times.