FPGARelated.com
Forums

FPGA communication with a PC (Windows)

Started by Bill Valores March 27, 2012
Hello all,

My team needs to design our own piece of testing equipment for our
project. I'll spare you the gory details, and just say that we will
need to collect data at some 20 Mbyte/sec (possibly continuously) and
somehow get it to a PC computer running Windows. A fancy GUI
application will then present this to the operator. A similar link is
necessary in the other direction for signal injection.

The FPGA does some data processing, so we can't just buy a data
capture card. We may consider a capturing card to interface with the
FPGA digitally.

So my question is: What's your recommendation for the PC-FPGA
communication? Given a fairly skilled engineering team and a
management that understands this is not a cheap quickie (but still
wants to keep costs and efforts at a minimum, of course) what would
you suggest? USB? PCIe? Ethernet? Capture data from debug pins?
Something else?

And: Can anyone give me an idea about what we're up against (costs and
time) based upon experience?

Purchasing equipment and IP cores is fine as long as the costs can be
justified in terms of saved engineering time. It's our own salaries
weighted against spending the money on products (with due risk
calculations and stuff).

Thanks in advance,
   Bill
"Bill Valores" <bill.valores@gmail.com> wrote in message 
news:33dd12b5-c2a4-4dab-bfba-8e801b27c37c@w32g2000vbt.googlegroups.com...
> So my question is: What's your recommendation for the PC-FPGA > communication?
Buy a FPGA on a PCIe development board, then add your stuff to it. A single lane gen1 may be just enough, so any other newer gen would do too.
On Tuesday, March 27, 2012 12:10:18 PM UTC+1, Bill Valores wrote:
> Hello all, > > My team needs to design our own piece of testing equipment for our > project. I'll spare you the gory details, and just say that we will > need to collect data at some 20 Mbyte/sec (possibly continuously) and > somehow get it to a PC computer running Windows. A fancy GUI > application will then present this to the operator. A similar link is > necessary in the other direction for signal injection. > > The FPGA does some data processing, so we can't just buy a data > capture card. We may consider a capturing card to interface with the > FPGA digitally. > > So my question is: What's your recommendation for the PC-FPGA > communication? Given a fairly skilled engineering team and a > management that understands this is not a cheap quickie (but still > wants to keep costs and efforts at a minimum, of course) what would > you suggest? USB? PCIe? Ethernet? Capture data from debug pins? > Something else? > > And: Can anyone give me an idea about what we're up against (costs and > time) based upon experience? > > Purchasing equipment and IP cores is fine as long as the costs can be > justified in terms of saved engineering time. It's our own salaries > weighted against spending the money on products (with due risk > calculations and stuff). > > Thanks in advance, > Bill
Hi Bill, My first thought would be to see if something from National Instruments' extensive range would suit your requirements. http://www.ni.com/fpga-hardware/ Even if you don't find an off-the-shelf solution from them, the website is a good resource for discovering the various comms and bus options. NI are undoubtedly at the pricier end of such solutions, but they have put a great deal of effort into ease of use, flexibility and support. You might even find that their Lab-View s/w can be used to create the GUI that you need. -- Regards, Andy McC
On Tuesday, March 27, 2012 7:10:18 AM UTC-4, Bill Valores wrote:
> My team needs to design our own piece of testing equipment for our > project. I'll spare you the gory details, and just say that we will > need to collect data at some 20 Mbyte/sec (possibly continuously) and > somehow get it to a PC computer running Windows. A fancy GUI > application will then present this to the operator. A similar link is > necessary in the other direction for signal injection. >=20
20 MB/sec going back up to the FPGA as well? Or simply a link that control= s the 20 MB/sec data that is going downstream to the PC?
> So my question is: What's your recommendation for the PC-FPGA > communication? Given a fairly skilled engineering team and a > management that understands this is not a cheap quickie (but still > wants to keep costs and efforts at a minimum, of course) what would > you suggest? USB? PCIe? Ethernet? Capture data from debug pins? > Something else? >=20
For a data point, 30-35 MB/sec is achievable via USB on a PC. At that poin= t, Windows becomes the bottleneck. Whether you're purchasing or designing = your own USB for the FPGA side of things you'll want to exercise simple dat= a transfers to see what you can achieve with whatever you choose. Also, you don't really mention what is the source for the FPGA data. That = would likely affect whether you have an external box with FPGA that communi= cates with the PC or whether it would be better to put the FPGA on a card i= nside the PC. Based on what you wrote, I'm guessing that you're envisionin= g an external box of some sort, but you should clarify. Kevin Jennings
Thanks for your answers so far. I'll address some issues shortly.

Yes, National Instruments was one of the first thoughts. The main
concern about this solution the per unit price in case we want to
duplicate the system. But it's definitely not ruled out.

Buying an PCIe development board is indeed easy. Implementing the
logic for the PCIe interface (I suppose DMA is the only option) and
writing the Windows drivers doesn't sound like a trip in the
rosegarden to me.

As for the form factor: A separate box solution, or a card stuck in
the PC, both go. Data needs to be flowing in both directions
simultaneously at 20 MB/sec in each direction.

As for USB: It's a generic name. The only solution we're aware of is
Cypress' EZUSB. Whether it fits the data rates is considered a
"maybe".
Bill Valores <bill.valores@gmail.com> wrote:
> Thanks for your answers so far. I'll address some issues shortly.
> Yes, National Instruments was one of the first thoughts. The main > concern about this solution the per unit price in case we want to > duplicate the system. But it's definitely not ruled out.
> Buying an PCIe development board is indeed easy. Implementing the > logic for the PCIe interface (I suppose DMA is the only option) and > writing the Windows drivers doesn't sound like a trip in the > rosegarden to me.
> As for the form factor: A separate box solution, or a card stuck in > the PC, both go. Data needs to be flowing in both directions > simultaneously at 20 MB/sec in each direction.
> As for USB: It's a generic name. The only solution we're aware of is > Cypress' EZUSB. Whether it fits the data rates is considered a > "maybe".
A FT(2)232H in synchronous FIFO mode should also be able to pump that rate into the PC. -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
On 03/27/2012 02:22 PM, Bill Valores wrote:
> Thanks for your answers so far. I'll address some issues shortly. > > Yes, National Instruments was one of the first thoughts. The main > concern about this solution the per unit price in case we want to > duplicate the system. But it's definitely not ruled out. > > Buying an PCIe development board is indeed easy. Implementing the > logic for the PCIe interface (I suppose DMA is the only option) and > writing the Windows drivers doesn't sound like a trip in the > rosegarden to me. > > As for the form factor: A separate box solution, or a card stuck in > the PC, both go. Data needs to be flowing in both directions > simultaneously at 20 MB/sec in each direction. > > As for USB: It's a generic name. The only solution we're aware of is > Cypress' EZUSB. Whether it fits the data rates is considered a > "maybe".
I wouldn't recommend USB. It's too flaky for reliable transfer. Why not ethernet ? Interfacing with a PHY is simple, and if you use UDP packets in a controlled environment (fixed IP addresses), the MAC layer is fairly straightforward too. Capturing the UDP traffic can be done with simple tool like netcat.
[replying to OP]

Ethernet is definitely a reasonable-risk option. For 20Mbytes/sec you will
need Gigabit Ethernet, so an FPGA with a hard MAC is a good idea, e.g.
Vitex-5 (other vendors' products may be equally suitable).

You will want a s/w element to accept TCP/IP packets (a stack in HDL is
theoretically possible). You can send UDP/IP from HDL.

PCIe might be a better idea, but never done it...
	   
					
---------------------------------------		
Posted through http://www.FPGARelated.com
Bill Valores <bill.valores@gmail.com> wrote:

>Hello all, > >My team needs to design our own piece of testing equipment for our >project. I'll spare you the gory details, and just say that we will >need to collect data at some 20 Mbyte/sec (possibly continuously) and >somehow get it to a PC computer running Windows. A fancy GUI >application will then present this to the operator. A similar link is >necessary in the other direction for signal injection. > >The FPGA does some data processing, so we can't just buy a data >capture card. We may consider a capturing card to interface with the >FPGA digitally. > >So my question is: What's your recommendation for the PC-FPGA >communication? Given a fairly skilled engineering team and a >management that understands this is not a cheap quickie (but still >wants to keep costs and efforts at a minimum, of course) what would >you suggest? USB? PCIe? Ethernet? Capture data from debug pins? >Something else? > >And: Can anyone give me an idea about what we're up against (costs and >time) based upon experience?
FTDI has parallel USB interface chips: http://www.ftdichip.com/Products/ICs/FT2232H.htm USB gives the least hassle to a user. -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico@nctdevpuntnl (punt=.) --------------------------------------------------------------
Arlet Ottens <usenet+5@c-scape.nl> wrote:

>On 03/27/2012 02:22 PM, Bill Valores wrote: >> Thanks for your answers so far. I'll address some issues shortly. >> >> Yes, National Instruments was one of the first thoughts. The main >> concern about this solution the per unit price in case we want to >> duplicate the system. But it's definitely not ruled out. >> >> Buying an PCIe development board is indeed easy. Implementing the >> logic for the PCIe interface (I suppose DMA is the only option) and >> writing the Windows drivers doesn't sound like a trip in the >> rosegarden to me. >> >> As for the form factor: A separate box solution, or a card stuck in >> the PC, both go. Data needs to be flowing in both directions >> simultaneously at 20 MB/sec in each direction. >> >> As for USB: It's a generic name. The only solution we're aware of is >> Cypress' EZUSB. Whether it fits the data rates is considered a >> "maybe". > >I wouldn't recommend USB. It's too flaky for reliable transfer.
That depends on the software driver and the EMC/EMI protection applied to the data lines.
>Why not ethernet ? Interfacing with a PHY is simple, and if you use UDP >packets in a controlled environment (fixed IP addresses), the MAC layer >is fairly straightforward too. > >Capturing the UDP traffic can be done with simple tool like netcat.
Libpcap is easy to use but don't forget that when using ethernet you are usually sharing the bandwidth, have to depend on the quality of network components and the people who maintain it. I wouldn't go that route unless it s absolutely necessary. -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico@nctdevpuntnl (punt=.) --------------------------------------------------------------