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

Write portion of frame buffer

Altera_Forum
Honored Contributor II
1,014 Views

Hi i would like, when i receive a new frame, to select the central part of it (clip) and store it in memory. The position where i save this piece of frame should depend on the frame number like this: 

 

| 1 | 2 | 3 | 4 | 

 

 

where 1 2 3 4 are the frame number. 

 

i would do: 

 

CVI --> CLIP --> Frame Buffer --> CVO 

 

How can i control the memory address where i want to write data?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
277 Views

You must specify what you are talking about. 

What kind of frames? Ehternet or whatever?  

Where do frames come from? 

What IP or module are you using? 

How are you supposed to write into memory?
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

What kind of frames? Ehternet or whatever?  

 

DVI Video Frames 

 

Where do frames come from? 

 

From a Camera 

 

What IP or module are you using? 

 

Altera VIP , DDR2 Memory Controller 

 

How are you supposed to write into memory?  

 

Now i write all the frames into a frame buffer  

 

i would in future: 

Get Video Frame 1 --> Take a small portion of it--> write in position 1 

Get Video Frame 2 --> Take a small portion of it --> write in position 2 

 

and so on...  

 

Then i would read a video frame composed of those pieces: 

 

| 1 | 2 | 3 | 4 | 

 

 

Every time i get for example frame 1, i refresh the portion of video in position 1
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

Maybe using a SGDMA at the clipper output?

0 Kudos
Altera_Forum
Honored Contributor II
277 Views

If you already can transfer the frame to memory, you should be able to change the address. 

Infact you said you now write to a frame buffer, so you defined somewhere a buffer address and address. I guess you only need to conditionate it with the frame number.
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

Thanks for your reply. 

I understand what you say but how can i conditionate this address?
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

I'm afraid, I don't know your VIP module, neither how you operate it, so I can't help you much. 

If you have the HDL source code (but I suppose you have not), you could find and modify the lines involved in the frame transfer. If it's provided as a black box with no configurable parameters for this, I think you can do little or nothing. 

A solution could be starting a memory to memory dma just after the VIP core has completed the frame transfer, and copy it to the right section. But this is somewhat inefficient and maybe inapplicable in your case.
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

Thanks for your reply! 

 

i think i need an interface between the video streaming(Avalon ST interface) coming from the clipper, and the memory controller (Avalon MM interface).  

 

es. 

Frame 1 --> Clipper --> write this data at location 1 in memory --> Frame Reader 

 

 

Maybe using a dma or i need a custom component?
0 Kudos
Reply