02-06-2009 11:36 AM
I need to acquire acoustic data from 4 channels (9233 or 9234) with a cRio system. I must acquire sound levels both linear and A-weighted, and 1/3 octave spectrum.
I cannot transfer data from the FPGA to the host because of throughput limitations (4 ch's * 50 kHz).
So I need to perform calculations directly on the FPGA and therafter to decimate data before tranfer to the host. Is there anyone who has already implemented A-scale filter and/or 1/3 octave banks for FPGA?
thank in advance
Giovanni
02-06-2009 12:46 PM
Hi Giovanni,
I don't quite understand why you can't transfer the data from FPGA to Host through DMA FIFOs. The throughput limitation of the PCI bus is realistically on the range of 100 MB/sec. My math could be terribly off here, but 4 CHs of 32-bit data (really 24-bit ADCs but we won't bit pack in this example) at a rate of 50 kHz should only require 800 kB/sec. You shouldn't have any problems with the throughput to the RT host.
I'm not sure if this will be helpful, but there's a Fixed-Point Octave Filter for FPGA (http://zone.ni.com/devzone/cda/tut/p/id/7761).
02-06-2009 01:09 PM
Hi Mike
thanks for your answer. Unfortunately I have the same problems as in http://forums.ni.com/ni/board/message?board.id=280&requireLogin=False&thread.id=1263
The Fifo transfer from FPGA to the Crio embedded controller seems too slow and doesn't keep up with 4 channels at full speed.
I can perform operations in the range of 40 kSamples total from FPGA to Host RT.
giovanni
02-06-2009 01:35 PM
02-06-2009 01:54 PM
I'm using 9004 and 9104 with LV 8.5
the Ni-Rio version is 2.3.1.
About the FIFO settings I tried some different configurations (anyway most typical 32767 and U32)
I can't find the example you're saying. Is it on LV 8.6?
My code is very similar to http://zone.ni.com/devzone/cda/epd/p/id/5817
of course I jus have the 9233 section
thanks
giovanni
02-06-2009 02:58 PM - edited 02-06-2009 02:58 PM
Hi Giovanni,
A lot of other stuff is going on in the RT VI in the example you pointed me to. This might be affecting things on your acquisition rates. I went ahead and downgraded the example from 8.6 to 8.5 and attached it below.
One thing I would recommend for you (although it's entirely up to you) is to upgrade NI-RIO to a version of 2.4 or higher (I'd recommend the newest version). This will allow you to read data from your cRIO modules in Fixed-Point Calibrated units so that you don't have to call Binary to Nominal on your host side. It also makes it easier to process data on the cRIO.
Let me know if the attached example helps out any. Good luck!
02-06-2009 03:03 PM
Hi Mike
thanks for your help.
Now here it's 10 PM so I had to get back home,
I'll be back tomorrow morrning.an try with your example.
thanks again
giovanni
02-07-2009 09:46 AM
02-10-2009 01:58 PM - edited 02-10-2009 01:59 PM
Hi Giovanni,
I apologize for how long it's taken me to respond. I had to find the hardware so that I could try it out.
I do have some suggestions for you.
Keep in mind that I used a 9014 myself to test this, so try some of the suggestions above to make sure you're capable of at least streaming from FPGA to Host at the rates you need. Then we can start looking at adding a processing loop if you already have some code that does the processing you need and we can see if that will keep up at your acquisition rates.
Regards,
02-11-2009 07:54 AM
Hi Mike
thank you very much for your help.
Disabling nearly everything but the FPGA->host data transfer also my systems seems to keep up. For extra RT code probably I have to upgrade the system.
thanks again
Giovanni