FPGARelated.com
Forums

The USB FPGA?

Started by Theo Markettos May 4, 2014
I've been pondering...

When it comes to attaching an FPGA to a PC, there are lots of options. 
First there's JTAG, then there's RS232, then there's ethernet, and PCIe. 
But there's an elephant in this room: why is USB on FPGA so hard?

Sure, every FPGA can be connected to a PC with USB, but it's usually through
a dumb bridge chip that does RS232, or maybe uses USB to bitbang JTAG.  USB2
is in 'easy' territory for FPGAs at 480Mbps, while USB3 5Gbps is the same
bitrate as PCIe Gen 2.  Every PC made in the last 15 years has USB. 
Meanwhile, being stuck behind a bridge chip we manage single-figures Mbps.

Now there are dev boards out there with USB PHY or USB MAC chips on them,
which is all very nice, but all very painful to program.  Plus they're never
there when you need them.  But why should this be necessary?  Any $2 junk
gadget comes with a USB2 device interface these days - I don't know what fab
process they use, but it can't be too fancy.  Likewise USB microcontrollers
are a few dollars.

I realise the USB stack isn't the most friendly to implementation on FPGA -
it doesn't play nicely with FPGA SERDES for example.  But if a $2 gadget can
have all the functions of a USB device on an antique process node, why don't
modern FPGAs have at least native USB2 device mode?

Theo
licensing, maybe?	   
					
---------------------------------------		
Posted through http://www.FPGARelated.com
Dne nedelja, 04. maj 2014 15:02:44 UTC je oseba Theo Markettos napisala:

<SNIP>

> But there's an elephant in this room: why is USB on FPGA so hard?
First, USB is crap. Second, you need license from USB consortium in order to get you manufacturer ID code spans etc. And IIRC it was on the order of EURO 4-5K If your inteface was a hard macro or built into a microcontroller, you might be able to get an ID or two free of charge from the producer of the chip, but without it you have to plunge the dough by yourself if you want to sell the thing as USB compatible. Ethernet MAC span is both cheaper and less neccessary.
On Sun, 04 May 2014 12:50:28 -0700, Brane2 wrote:

> Dne nedelja, 04. maj 2014 15:02:44 UTC je oseba Theo Markettos napisala: > > <SNIP> > >> But there's an elephant in this room: why is USB on FPGA so hard? > > First, USB is crap. > > Second, you need license from USB consortium in order to get you > manufacturer ID code spans etc. And IIRC it was on the order of EURO > 4-5K > > If your inteface was a hard macro or built into a microcontroller, you > might be able to get an ID or two free of charge from the producer of > the chip, but without it you have to plunge the dough by yourself if you > want to sell the thing as USB compatible. > > Ethernet MAC span is both cheaper and less neccessary.
I'll second the "USB is crap" comment. If you must use USB2, I recommend using external PHY parts. I know of three "standards" for interfacing controller chips to PHYs: - UTMI+ (60MHz parallel) - ULPI (60MHz parallel) - HSIC (240MHz DDR) You can buy PHY chips from Microchip (nee SMSC), TI, etc. I've only used ULPI ones from SMSC. BTW, there's a USB3.1 standard on the way, giving around 10Mb/s, with 5V / 2A power. It uses similar connections to USB3.0, but with different signalling. Regards, Allan
> I'll second the "USB is crap" comment.
What a strange comment. It is what it is, not perfect, but nothing is perfect. You could say everything we do or use is crap if you don't state why. USB is usually a requirement for implementers. For users it's a cheap interface for connecting their gadgets. Think of all the revenue generated for companies through the application of USB. JJS
Dne ponedeljek, 05. maj 2014 16:57:24 UTC je oseba John Speth napisala:
> > I'll second the "USB is crap" comment. > > > > What a strange comment. It is what it is, not perfect, but nothing is > > perfect.
Crap is also not perfect, so no collision there.
> You could say everything we do or use is crap if you don't > > state why. >
It would be far to tedious. But in short - collective intelligence of its implementing body ranges from braindead to level of average moron. Its standard haven't so much evolved as it caught tumor which has during the course of its growth simply eaten original intentions and implementation. It's like one of those news we keep reading about "Doctors removed 100lb tumor". Except that this patient haven't had the courage to go lie under scalpel yet. When tumor overgrows you, "benign" means just that it prefers having you around as a carrier instead as food...
On 5/5/2014 1:35 PM, Brane2 wrote:
> Dne ponedeljek, 05. maj 2014 16:57:24 UTC je oseba John Speth napisala: >>> I'll second the "USB is crap" comment. >> >> >> >> What a strange comment. It is what it is, not perfect, but nothing is >> >> perfect. > > Crap is also not perfect, so no collision there. > > >> You could say everything we do or use is crap if you don't >> >> state why. >> > > It would be far to tedious. > > But in short - collective intelligence of its implementing body ranges from braindead to level of average moron. > > Its standard haven't so much evolved as it caught tumor which has during the course of its growth simply eaten original intentions and implementation. > > It's like one of those news we keep reading about "Doctors removed 100lb tumor". > > Except that this patient haven't had the courage to go lie under scalpel yet. > When tumor overgrows you, "benign" means just that it prefers having you around as a carrier instead as food...
Yes, that is much better. I understand perfectly what you don't like about USB now. Thanks for the huge clarity in explanation... ;) Meanwhile the rest of us get on with our work using USB... -- Rick
Allan Herriman <allanherriman@hotmail.com> wrote:
> I'll second the "USB is crap" comment.
It may be. But look at your FPGA. How do you connect it to your PC? It might have ethernet or PCIe, but almost invariably what comes first is USB.
> If you must use USB2, I recommend using external PHY parts.
This is the wrong solution because those chips are never there when you need them. If you're doing your own board you can put on one, but many dev boards don't have them. Then you need to program the PHY chip, and then you need a softcore MAC on the FPGA. The FPGA vendors don't provide this for free, so it's $30K to thirdparty vendors before you're started. And it'll take you a very long time to get started because you need to understand it first. Meanwhile a USB2 microcontroller with flexible endpoint support is $6. Why can't this functionality fit on an FPGA? Why does every dev board have a dumb FTDI chip on it as a bridge to RS232 or JTAG? Why isn't USB2 an FPGA programming option (in addition to JTAG)? After all, plenty of consumer kit these days has USB2 reprogram/recovery/firmware update modes.
> BTW, there's a USB3.1 standard on the way, giving around 10Mb/s, with > 5V / 2A power. It uses similar connections to USB3.0, but with different > signalling.
Do you know if the signalling is more amenable to FPGA transceivers than current USB2? I admit I haven't looked at the USB3.0 signalling standard either. (It's at least not trying to drive wires bidirectionally). Theo
On 5/5/2014 1:40 PM, rickman wrote:

> > Yes, that is much better. I understand perfectly what you don't like > about USB now. Thanks for the huge clarity in explanation... ;) > > Meanwhile the rest of us get on with our work using USB... >
Yup. It's the worst interface there is - except for the alternatives... Rob.
W dniu 2014-05-04 17:02, Theo Markettos pisze:
> I've been pondering... > > When it comes to attaching an FPGA to a PC, there are lots of options. > First there's JTAG, then there's RS232, then there's ethernet, and PCIe. > But there's an elephant in this room: why is USB on FPGA so hard? > > Sure, every FPGA can be connected to a PC with USB, but it's usually through > a dumb bridge chip that does RS232, or maybe uses USB to bitbang JTAG. USB2 > is in 'easy' territory for FPGAs at 480Mbps, while USB3 5Gbps is the same > bitrate as PCIe Gen 2. Every PC made in the last 15 years has USB. > Meanwhile, being stuck behind a bridge chip we manage single-figures Mbps. > > Now there are dev boards out there with USB PHY or USB MAC chips on them, > which is all very nice, but all very painful to program. Plus they're never > there when you need them. But why should this be necessary? Any $2 junk > gadget comes with a USB2 device interface these days - I don't know what fab > process they use, but it can't be too fancy. Likewise USB microcontrollers > are a few dollars. > > I realise the USB stack isn't the most friendly to implementation on FPGA - > it doesn't play nicely with FPGA SERDES for example. But if a $2 gadget can > have all the functions of a USB device on an antique process node, why don't > modern FPGAs have at least native USB2 device mode? > > Theo >
Use first from the row FPGA SoC kit with linux on board. Then you have not only FPGA but also almost standard ARM subsystem with all ethernet, usb, rs232 and so on. Typically you can start ready to use linux image from sd card. This way you have solved problem with interfacing PC to fpga cause ARM system has pretty wide access to FPGA resources. Take a look here: http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=167&No=816&PartNo=2 Adam