FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2009, 01:58 AM
Muzaffer Kal
Guest
 
Posts: n/a
Default Re: USB port on FPGA - How is data transmitted?

On Sun, 29 Mar 2009 18:34:04 -0500, "dts4theworld"
<[email protected]> wrote:

>Hi everyone,
>
>I'm currently working on a project which involves a Virtex 5 board with
>USB port (and Cypress FX2 MicroController).
>My goal is to connect a webcam to the FPGA board and process that input
>data with an algorithm which should detect movement (a simple one).
>
>From the forums I found on the web I understood that this is not an easy
>task - connecting the webcam to the FPGA and processing the video signal -
>and I'm now searching for any relevant information regarding this.
>
>I'm using an UVC (USB Video Class) compatible webcam, and I have the
>documentation for this from usb.org, but still can't figure out exactly how
>the video signal is transmitted (how do you initialize the webcam, how does
>the host ask for data, and how is the received data structured). By the
>way, I'm working in verilog.
>
>Is there any link/documentation or example which could possibly help me?
>
>Thank you in advance,
>Chris
>


This is a significant project as you have figured out. It is not
advisable to try to implement the UVC portion in hardware. My
suggestion would be to get the linux UVC stack and port the relevant
portions of it to a processor (soft-core or otherwise) implemented in
your fpga design.
Very simplistically, you need a host controller and a UVC driver to
talk to the webcam. When the webcam is attached, the host controller
sends it USB packets to enumerate the device to find what kind of
end-point(s) it supports and hand it off to the UVC stack for video
related packet processing. You really don't want to (re)do this in
hardware. Get a processor and port enough of linux UVC stack to it,
which is a significant task by itself but much smaller than doing all
of it yourself.
There is also the problem of convincing the fx2 to act as a usb host.
It's usually used in peripheral device implementations but it might be
possible to hack it to behave like a host in a limited way which
should be enough for your purposes.
--
Muzaffer Kal

DSPIA INC.
ASIC/FPGA Design Services
http://www.dspia.com
Reply With Quote
  #2 (permalink)  
Old 03-30-2009, 01:34 AM
dts4theworld
Guest
 
Posts: n/a
Default USB port on FPGA - How is data transmitted?

Hi everyone,

I'm currently working on a project which involves a Virtex 5 board wit
USB port (and Cypress FX2 MicroController).
My goal is to connect a webcam to the FPGA board and process that inpu
data with an algorithm which should detect movement (a simple one).

From the forums I found on the web I understood that this is not an eas
task - connecting the webcam to the FPGA and processing the video signal
and I'm now searching for any relevant information regarding this.

I'm using an UVC (USB Video Class) compatible webcam, and I have th
documentation for this from usb.org, but still can't figure out exactly ho
the video signal is transmitted (how do you initialize the webcam, how doe
the host ask for data, and how is the received data structured). By th
way, I'm working in verilog.

Is there any link/documentation or example which could possibly help me?

Thank you in advance,
Chris


Reply With Quote
  #3 (permalink)  
Old 03-30-2009, 04:30 PM
dts4theworld
Guest
 
Posts: n/a
Default Re: USB port on FPGA - How is data transmitted?

>On Sun, 29 Mar 2009 18:34:04 -0500, "dts4theworld"
><[email protected]> wrote:
>
>>Hi everyone,
>>
>>I'm currently working on a project which involves a Virtex 5 board with
>>USB port (and Cypress FX2 MicroController).
>>My goal is to connect a webcam to the FPGA board and process that input
>>data with an algorithm which should detect movement (a simple one).
>>
>>From the forums I found on the web I understood that this is not a

easy
>>task - connecting the webcam to the FPGA and processing the video signa

-
>>and I'm now searching for any relevant information regarding this.
>>
>>I'm using an UVC (USB Video Class) compatible webcam, and I have the
>>documentation for this from usb.org, but still can't figure out exactl

how
>>the video signal is transmitted (how do you initialize the webcam, ho

does
>>the host ask for data, and how is the received data structured). By the
>>way, I'm working in verilog.
>>
>>Is there any link/documentation or example which could possibly help me


>>
>>Thank you in advance,
>>Chris
>>

>
>This is a significant project as you have figured out. It is not
>advisable to try to implement the UVC portion in hardware. My
>suggestion would be to get the linux UVC stack and port the relevant
>portions of it to a processor (soft-core or otherwise) implemented in
>your fpga design.
>Very simplistically, you need a host controller and a UVC driver to
>talk to the webcam. When the webcam is attached, the host controller
>sends it USB packets to enumerate the device to find what kind of
>end-point(s) it supports and hand it off to the UVC stack for video
>related packet processing. You really don't want to (re)do this in
>hardware. Get a processor and port enough of linux UVC stack to it,
>which is a significant task by itself but much smaller than doing all
>of it yourself.
>There is also the problem of convincing the fx2 to act as a usb host.
>It's usually used in peripheral device implementations but it might be
>possible to hack it to behave like a host in a limited way which
>should be enough for your purposes.
>--
>Muzaffer Kal
>
>DSPIA INC.
>ASIC/FPGA Design Services
>http://www.dspia.com
>



Dear Mr. Kal,

Thank you very much for your input, such advice is just what I need righ
now.

I'm trying now to figure out what I need to know in order to get som
results. First off, I now need a processor design which can support thi
UVC driver (parts of it) - Can I use here an open-core design?
The signal processing has to be hardware.. i'm not sure how to get thes
together. You advised me not to try a hardware implementation of the UVC.
but then wouldn't my driver need to control the signal processing part a
well? About the FX2 - the manual sais it's no problem to run it as host
It's a Virtex 5-LX board from Avnet.

Are there any alternatives which might allow me to skip the US
communication nightmare? I found some attempts to tap directly into th
camera's signal coming from the image sensor. Would that be a good/feasibl
idea?

I was also thinking if it would be easier to get the data from the webca
through the laptop, which would then feed the FPGA board through some othe
interface.

Thank you,
Chris

Reply With Quote
  #4 (permalink)  
Old 03-30-2009, 05:55 PM
Muzaffer Kal
Guest
 
Posts: n/a
Default Re: USB port on FPGA - How is data transmitted?

On Mon, 30 Mar 2009 09:30:28 -0500, "dts4theworld"
<[email protected]> wrote:
>I'm trying now to figure out what I need to know in order to get some
>results. First off, I now need a processor design which can support this
>UVC driver (parts of it) - Can I use here an open-core design?

Any processor which has a C compiler can be made to work in this
context.

>The signal processing has to be hardware.. i'm not sure how to get these
>together. You advised me not to try a hardware implementation of the UVC..
>but then wouldn't my driver need to control the signal processing part as
>well?

No. The UVC stack basically has the responsibility of delivering the
client app the frames coming from the webcam which is where your DSP
shoud start.

>About the FX2 - the manual sais it's no problem to run it as host.

That's good news.

>I was also thinking if it would be easier to get the data from the webcam
>through the laptop, which would then feed the FPGA board through some other
>interface.


That's the solution I'd suggest. Writing a client app on the PC which
then transfers individual frames back to the fpga board again in USB
but in a much simpler protocol (specific to your design) makes your
life much easier. Even if you need an integrated solution in the
future, starting this way to validate your signal processing
algorithms make sense.


Muzaffer Kal

DSPIA INC.
ASIC/FPGA Design Services
http://www.dspia.com
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chipscope data port limitation to 256 bits Clemens FPGA 4 07-11-2008 11:57 AM
How to get the expected value of the transmitted signal? ericknightX DSP 1 04-06-2007 12:29 PM
Effect of Additive White Gaussian Noise (AWGN) on the Transmitted Data THE_KILLER DSP 1 11-17-2006 08:36 AM
Plotting serial port data vyshali DSP 1 07-11-2006 09:33 PM
ChipScope 7.1 w/ EDK 7.1 data port bit ordering issue Nju Njoroge FPGA 1 11-28-2005 11:34 PM


All times are GMT +1. The time now is 12:12 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved