FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP

Video Clocked Input

Altera_Forum
Honored Contributor II
1,119 Views

Hi all, 

I am reading data from OV7670. I want to use Video Clocked Input to convert clocked video to streaming video, then store it to DDR3 SDRAM through Frame Buffer. 

OV7670's signals are PLCK(pixel clock, here is 24MHz), HREF(posedge = new line), VSYNC (posedge = new frame). Each posedge of pclk i will get 1byte data (XR or GB).  

While Clocked Video Input's signals are:  

-vid_datavalid 

-vid_hsync 

-vid_vsync 

-vid_data 

Can anybody give me an advise how to connect them. Should I process the camera signals in advanced, then connect them to CVI?
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
430 Views

Hi, 

You have to know the format of your video (for example I use YCbYCr 4:2:2, which is 8 bit per color plane, 2 color planes in sequence so 1 parallel). 

In my example vid_data will be a bus of 8 bit, and I will attach there my clocked video. The hsync and vsync are obviously the syncs, I think they are your HREF and VSYNC. 

Finally I have always tied vid_datavalid to VCC. 

 

I don't know a lot about OV7670, but looking very quickly its datasheet it seems that it will give you video data already good for CVI. 

Bye
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

I see that we must have a license to use Altera Frame Buffer. So I cant go with this direction.  

Assume that: each pixel clock I get 12bit RGB444(each vertical counter and horizontal counter). Now I want to store it in DDR3 SDRAM with datawidth =128 bit.  

Can you tell me how can I store the data to SDRAM with pixel position?
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

If I am not wrong, all the VIP packet (including Frame Buffer) is OpenCore+. So you can try it programming the FPGA with .sof file. Anyway, if you need it to work uninterruptedly you would need .pof file.. and to obtain it you need license. 

You need a SDRAM controller IP surely. A question: why do you want to use CVI and transform video in Avalon Streaming format? In my opinion, if you can't use Altera IP from VIP suite it's useless. 

I would try to store the video from OV7670 directly to the SDRAM. 

But maybe someone could correct me.
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

First of all, thank for your time! 

Because I am having a problem: I am using 12bit RGB data format. But the data width of my DDR3 SDRAM interface is 128bit. I dont know how to store my video data (each 12bit data has its vertical counter and horizontal counter) to DDR3 SDRAM, so that the address of data in SDRAM is pixel address!
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

Sorry, but I don't see the problem. You can use 12 bit out of 128 for each address to store informations for each pixel. Or if you don't want to waste space memory you could store a certain number of consecutive pixel for each address. But I think that you need in all cases to write an IP to prepare your data for the memory controller.

0 Kudos
Altera_Forum
Honored Contributor II
430 Views

I intend to use Ram buffer. Firstly, I will store 1 line to Ram, when Ram is full I read it and store to DDR3 SDRAM.  

And Ram is 16 bit input, 128 bit output. It means that 1 location in SDRAM will store 8pixels. What do you think about that?
0 Kudos
Reply