High speed USB devices

Hi,

I'm building a custom USB-camera. There will be an FPGA chip doing some simple data handling for the sensor data and after that the image needs to be transmitted to a PC or an embedded Linux computer.

Estimated raw data rate is almost 30 megabytes per second without any compression. Basically a single endpoint is enough for the task.

What are the available chips in addition to Cypress FX2, NXP ISP1581 ?

And how much compression will I be needing, i.e. what is the best performance available ?

--
OH2HVJ Mikko
Reply to
Mikko OH2HVJ
Loading thread data ...

On a project where we used the Cypress FX2 we were able to get data rates of about 32 MBytes/s, though I remember that some fine tuning on the FX2 side was needed to achieve this rate. So in theory you don't need compression.

Reply to
Dombo

imple

ance

It depends on the sensor and image, capturing frame or video. For example, we are dealing with single frame 2048x1536 24 bits color. The image is ~ 9MB raw and 150KB compressed. We have 96KB frame buffer on the controller. Our controller is capable of push/pull temporary storage data on the camera's SD card as well.

Reply to
linnix

something like this in fifo mode:

formatting link
should do it. Or just a 2.0 phy and an usb 20.0 core, theres one on opencores I think

-Lasse

Reply to
langwadt

Simpler to just buy an existing camera.

You are obviously already in over your head.

Reply to
Chieftain of the Carpet Crawlers

Thanks for the comment. Can you remember what tuning did you do ? We managed to get 22MBytes/s just by requesting larger transfers from the Cypress API. This way the function did not return to user-mode code until a larger tranfer was done. This capped out with 8kB transfers.

--
Mikko OH2HVJ
Reply to
Mikko OH2HVJ

formatting link

What kind of performance can be expected from the FT232H ?

USB2.0 IP core might indeed be quite interesting, does anyone here experience on them ? I do have an experienced FPGA guy in team, but would like to use as simple approach as possible.

--
Mikko OH2HVJ
Reply to
Mikko OH2HVJ

Unfortunately I don't know the details (the fine tuning was not done by me). I vaguely remember it had to do something with configuring buffering and endpoints on the FX2 side to squeeze the last bit of performance out of it. I'm sorry I cannot be more specific than that.

Reply to
Dombo

T2232H.htm

ence on

s simple approach

One thing to consider is that you might have to run the FPGA at 400MHz for HS. Dedicated chips usually have internal PLL to multiple from slower external crystal (i.e. 12mHz).

Reply to
linnix

Ok, thanks for giving faith anyway!

I remembered that I have USRP software radio that I used for a GPS project. I googled for USRP USB bandwidth and it seems that even 45MBytes/sec is possible!

--
Mikko
Reply to
Mikko OH2HVJ

The UTMI interface runs at 60MHz, 8-bit wide. This route would be interesting, as we're size constrained and the PHY chips seems to be in almost tiny packages.

--
Mikko
Reply to
Mikko OH2HVJ

t. I googled for

That's the USB bandwidth, but does not mean you can stream at max. speed without latency and delay. You must have enough buffers to take care of milli-seconds gaps. Otherwise, you will have scrambled pictures or black spots.

Reply to
linnix

mode:

formatting link

ft2232H not ft232H, I've never used it but they claim 40Mbyte/sec in single channel fifo mode

-Lasse

Reply to
langwadt

ting, as

ges.

yeh, the phy does the serial-parallel, parallel-serial conversion clock recovery etc.

I'd think integrating the usb into the fpga it is unlikely that there will be any bottlenecks on the device side, with an external device you never know what limitations there might be

-Lasse

Reply to
langwadt

mode:

formatting link

FT232H should be similar to FT2232H in synchronous FIFO mode. However the FT232H has not been released yet.

--
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
 Click to see the full signature
Reply to
Uwe Bonnes

mode:

formatting link

you are right, I missed the significance of the H and assumed is was the old full-speed rs232 device

-Lasse

Reply to
langwadt

googled for

In most cases we have seen the bottle-necks on the PC side. The FX2 with the default 512 EP FIFO was sufficient to get to ~30MB/sec. The buffering and threading on the PC side has to be handled carefully. It will depend on the drivers you are using on the PC, how often you get the data (poll or block), and how many threads.

.chris

Reply to
Christopher Felton

ject. I googled for

e

But the image sensor data is very critical in timing, you have to clock in 24 bits in parallel and reformat usb serial out. Buffering needs to be done at the FPGA side as well.

Reply to
linnix

ect. I googled for

When you add the framing and bit-stuffing, 480Mbps becomes 40MBps. USB is an "expensive" protocol. And when using a "consumer grade graphical OS" streaming for anything other than direct disk reads/ writes is limited to about 1/2 of that.

Ask me how I know some time...

Reply to
NeedCleverHandle

Fortunately in this application we'll have almost full control of the PC. The first version will be using the common consumer-grade OS, but later on there will be a custom Linux box on the other end of the USB.

We'll have a buffer for a few frames, so matching the sensor timing with USB traffic is 'easy'.

Thanks everyone, this was a very useful thread!

-- Mikko

Reply to
Mikko OH2HVJ

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.