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