- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2010 03:35 AM
Hello,
I need to implement a basic High Speed USB host interface for my Spartan-6 FPGA.
I read many posts but I still can not get to know which solution would be convenient for me:
- Whether using a USB Controller like ISP1761,
- Whether using a PHY with ULPI interface like USB3300.
1 - In each case, would I need to use the MicroBlaze SoftCore? What are the advantages/drawbacks when using it?
2 - As It seems to be quite a nightmare to program USB interfaces, perhaps I should think about buying an IP core (XPS USB Host Controller from xilinx for example?) Anyone would know the range of prices for those cores and who I could buy them from?
3 - How much FPGA ressources would I need in each case?
4 - Is there an easier way than others?
Thanks for any comment that would help me to clarify the problem.
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2010 04:56 AM
You can purchase a USB core (with off-chip ULPI PHY), and most likely you'll need a processor (MicroBlaze is one) to go along with it.
Or you can buy a microprocessor with integrated USB device (or On-The-Go) port and PHY, to place on the board next to your FPGA.
Of you can put a USB <=> serial interface chip on the board, which presents a full duplex serial interface to the FPGA. This is probably the cheapest and simplest implementation, but it limits you to about 300KByte/sec peak transfer rate in each direction (equivalent to 3Mbaud serial link).
All of these make sense, all of these have different costs with respect to development time and parts cost.
What's the sustained data transfer rate required of your design? That's a good place to start for bounding your solution.
So... post some additional details.
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2010 05:43 AM
Hello,
Thank you for helping.
1 - "You can purchase a USB core (with off-chip ULPI PHY), and most likely you'll need a processor (MicroBlaze is one) to go along with it."
How expensive would be such a core? I read that:
(1) Commercial IP core - cost is $10K and over !
(2) Opencores - either buggy or encumbered by GPL license
Can I imagine programming such a core by myself without a one year headache?
2 - "Or you can buy a microprocessor with integrated USB device (or On-The-Go) port and PHY, to place on the board next to your FPGA."
There's some options at Full-Speed but a few at High Speed. I found the ISP1763 would be a good chip?
How much work Is it compare to using a core?
Would it use more or less FPGA ressources than Microblaze + USB Core? In what proportions?
3 - "Of you can put a USB <=> serial interface chip on the board, which presents a full duplex serial interface to the FPGA. This is probably the cheapest and simplest implementation, but it limits you to about 300KByte/sec peak transfer rate in each direction (equivalent to 3Mbaud serial link)."
This USB interface aims at receiving video streaming (dozens of Mbps), so I can't use this kind of interface.
Thanks a lot,
YH.
Re: USB Interface
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2010 06:06 AM - edited 12-20-2010 06:12 AM
1 - "You can purchase a USB core (with off-chip ULPI PHY), and most likely you'll need a processor (MicroBlaze is one) to go along with it."
How expensive would be such a core? I read that:
(1) Commercial IP core - cost is $10K and over !
(2) Opencores - either buggy or encumbered by GPL license
Can I imagine programming such a core by myself without a one year headache?
Only if I absolutely needed it. There's a lot of other things I could be doing over a year's time. There are lots of people who will quote you pricing on a USB2 core. Don't skimp on due diligence work.
2 - "Or you can buy a microprocessor with integrated USB device (or On-The-Go) port and PHY, to place on the board next to your FPGA."
There's some options at Full-Speed but a few at High Speed. I found the ISP1763 would be a good chip?
How much work Is it compare to using a core?
Would it use more or less FPGA ressources than Microblaze + USB Core? In what proportions?
I don't have the time to research this option for you. Having said that, I've seen numerous very low cost "single-chip MP3 player" devices which include memory, processor, GPIO, external data bus, and USB device (peripheral) interface. Don't forget that MicroBlaze needs program and storage memory, and you'll need a USB PHY.
3 - "Of you can put a USB <=> serial interface chip on the board, which presents a full duplex serial interface to the FPGA. This is probably the cheapest and simplest implementation, but it limits you to about 300KByte/sec peak transfer rate in each direction (equivalent to 3Mbaud serial link)."
This USB interface aims at receiving video streaming (dozens of Mbps), so I can't use this kind of interface.
Might you be better off with 100BT ethernet? Don't accept the USB2 figure of 480Mb/sec at face value. It's worth your time to run trials with real PCs and peripherals, and verify real-world effective sustained data transfer rates. A USB-connected solid state drive might be a useful target device for such a trial, just to verify that USB2 will meet your needs.
Another suggestion or two: eSATA or external PCIe. Both will easily meet the data bandwidth you are seeking. I believe there's quite a bit of support for PCIe on Spartan 6 (hint hint).
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2010 10:48 PM
Last question:
Do I need MicroBlaze to build the interface between my FPGA and the uController ISP1761? And Why?
Thanks
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-20-2010 11:05 PM
The isp1763 has a bus interface for either 8bit or 16bit processor. You can use MicroBlaze, or some external processor.
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-21-2010 01:49 AM
Hello Bob,
Can't I just manage this bus without to implement the Microblazer? The FPGA is not that large and I would choose the "lighter" option...
The use of this USB interface is for video streaming reception and I've read on a forum that at "high Bandwidth":
"a fpga softcore processor could have it hard time shuffling the data, most likely there would be some "gaps" of time when the cpu has not managed to fill/empty some buffer at the time when the usb bus would be ready." " Data will come as an isochronous HS stream, so I'll try to route them inside the FPGA directly to the logic that needs them, avoiding the softcore".
I'm also a bit troubled by the fact that many people use a driver for UClinux with Microblaze to deal with the USB Port. Isn't it too "heavy" stuff?
Thanks for your good help.
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-21-2010 02:05 AM
I'm not an expert on SW drivers for USB cores. You may want to check in at the Connectivity forum, instead of the General Discussion forum. But first, check with the ST Ericsson folks for recommendations -- they are most likely the authorities on their own USB interface designs.
Why don't you look through the SDK for the USB peripheral you are interested in using. Check how much SW maintenance and supervision is involved. If it's simple and repetitive, you don't need a MicroBlaze to run it. Otherwise, you need a processor of some sort.
If you're planning on configuring your board as the USB HOST, then I'm pretty sure you'll need a processor,
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-21-2010 02:05 AM
Then use DMA for the "data shuffling" and let the CPU control the DMA and control logic. This way, a PicoBlaze might even be sufficient (that's just a guess, though).
Adrian
Signature:
1. Google your question before asking it.
2. If Google doesn't find a solution, post your question in a detailed, comprehensive, and clear way.
3. If someone answers your question, mark the post with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left).
Re: USB Interface
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-21-2010 01:50 PM
awillen wrote:
Then use DMA for the "data shuffling" and let the CPU control the DMA and control logic. This way, a PicoBlaze might even be sufficient (that's just a guess, though).
Adrian
Adrian's answer is a good one.
Usually, the isochronous endpoints are handled by some sort of DMA mechanism and the processor (whatever it might be) doesn't touch those data.
However, the control endpoint is different. It's what's used to handle enumeration and a lot of other things. So while it's possible to do a hardware state machine to handle it, the resource usage will likely be greater than if you used a small processor.
----------------------------------------------------------------
Yes, I do this for a living.











