6

For an medium-high speed ADC converter, my FPGA is currently receiving 16-bit samples at 54 MHz over an LVDS interface (4 differential signal lines plus 1 differential clock signal). These are video/camera signals.

Now, I need to consider how I can get the image from the FPGA to the PC. I have a micro-controller and a USB-OTG interface. But USB is 480 Mbit/s, and probably down to 35 MB/s effectively (or less), which is not high enough for 16 bits 1.5 MPixels @ 54 frames/sec. That would be 162 MB/sec, far too high for USB 2.0. Am I forced to use USB 3.0? I really did want to get the raw images out to the PC. I also could conceivably perform loss-less compression on the FPGA.

The second question is how to stream this data out of the FPGA. I could buffer the ADC-data in external RAM, or I could set up an interface to the micro-controller, or even directly drive output signals on a port. Either way, what options do I have w.r.t. large streams of data?

Any help would be appreciated!

  • You want to use a microcontroller for 162MB/s... Really? What microcontroller exactly were you planning on using? – Tom Carpenter Oct 30 '15 at 19:31
  • No, not directly, of course. However, the uController needs to be in a supervising role. – Pål-Kristian Engstad Oct 30 '15 at 19:49
  • Can you add some other interface specifically for video? HDMI or something? – user57037 Oct 30 '15 at 23:28
  • There are HD video capture cards, Black Magic I think make some 1080p60 / HDMI / HD-SDI ones, but it's a big ask for uncompressed / lossless video as the bandwidth is at the limit of what a lot of hardware is designed for in any sustained manner. – John U Nov 02 '15 at 11:15
  • 1
    ...on the other hand, compressed data can be made insanely small, 1080p30 pictures can be squirted down ethernet at 1Mbit/s with a decent H.264 codec in surprisingly good quality. – John U Nov 02 '15 at 11:17
  • One project I'm working on uses a TI DaVinci processor which is a DSP-core to handle the video coding (LVDS -> H.264 / MPEG4 / MJPEG) and an ARM-core supervising running Linux. – John U Nov 02 '15 at 11:20
  • You cna foget the USB2, there is no way you can get that to work without some very strong compression, but you can easily use a USB3 board such as this one https://www.arrow.com/en/products/beusb3.0/arrow-development-tools/#page-1 that can be 'hacked' to connect to any FPGA board, or buy one of the other ones availabe on the market. With that you can get up to 100MB/s not more (militation of the Cypress CPU) – FarhadA Nov 03 '15 at 16:13
  • 1
    To be honest with you, I would go with PCIE instead of USB to make sure you will not have any surprises later on. The PCIe boards are pretty common and you can get one at a decent price and with a standard connector (FMC) to connect to your ADC, and even with a 4 channle PCIe gen1, you get a far better performance than USB2/3 can offer. – FarhadA Nov 03 '15 at 16:17

1 Answers1

3

Your bandwidth requirement is wayyyy beyond USB2 (by a factor of 4-5x). Unless your images have some special features you can take advantage of, lossless compression is only going to get you a 50% (ish) improvement, so that's not going to work.

You have to either increase your available bandwidth (USB3) or reduce the bandwidth requirement (ie resolution, frame rate, bit depth or some combination).

Regarding the FPGA->USB interface, if you want something easy to get going, try Opal Kelly's boards - they have done the USB3/FPGA interfacing bit for you and you can concentrate on the bit that interests you. (I have no connection with OK other than as a happy user of their stuff.)

Otherwise, you need a micro with the USB interface on it and some FIFO-like hardware+DMA engine so that the micro is (as you say) only supervising the data transfers. Cypress make some. FTDI also (although they are micros, you don't have to touch the innards, you can pretend they are a FIFO and the data 'magically' appears at the PC).

Martin Thompson
  • 8,439
  • 1
  • 23
  • 44