Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21345 Discussions

hardware processing images

Altera_Forum
Honored Contributor II
1,156 Views

I have developed an application that using NIOSII under uCOS + nichestack receives images by using UDP protocol. 

 

I have developed an image processing algorithm by using DSP Builder 

 

I know I can include in my system my hardware algorithm by calling a new component from SOPC Builder. 

 

But I don't know how can I send the image received to the hardware processing, How should I do it?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
486 Views

We'll need a little more information before giving a detailed answer. What is the interface on your image processing algorithm? (Avalon Streaming or Avalon Memory-mapped slave) 

 

You could use a DMA controller. Your received image data is located somewhere in memory. If you give the DMA controller the address of the image data and tell it how long it is, it can transfer the data into your image processing block. The SGDMA controller may fit your need. 

 

If speed is not an issue, you could also manually send the data to your block using the processor. This would require some type of memory-mapped slave interface to your block. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
486 Views

The algorithm developped in Simulink is based on the same method used in Avalon Edge detector example from Altera. This example uses Avalon-MM. 

 

But I don't have so much experience with Avalon and I don't see clear what will be the best for me Avalon-ST or Avalon-MM. 

 

All incoming images will be 320x240, 76800 pixels * 16 bits = 153.6Kbytes. 

I'm using Cyclone III NIOSII eval kit 

Bandwith will be 5-10 frame/s  

 

I can have 2 posibilities , 

 

1) After receiving an image by UDP protocol (Nios+niche stack), I think I should write the image to memory (SRAM or DDR) in this case, Should I use Avalon-MM? 

 

2) In the case that I would receive images from hardware by BT.656 parallel interface (no NIOS intervention), I think I wouldn't have to write data in external memory. Should I use Avalon-ST in this case?
0 Kudos
Altera_Forum
Honored Contributor II
486 Views

Whether you use streaming or memory-mapped doesn't necessarily matter.  

 

If you are using the NIOS with the InterNiche Stack, then once the packet is received, the data is already in memory. You can start just reading the data from memory and sending it to your processing block. You could do this either directly in the NIOS or using a DMA controller. 

 

If you are not going to use the NIOS, you may not need to buffer the frame in external memory before processing it. You may be able to just send the data to your processing block as it comes in. This depends on your system design. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
486 Views

Hi Jak, 

 

First all, thanks for your great help!!! 

 

Once I have received an UDP packect, it is in memory. But What Would be the fast way to proccess it?  

 

Could be by writing in specific memory location and a signal from NIOS to signaling to the block starting to process data from memory? 

 

My main doubt is how to link data from NIOS and hardware developped.
0 Kudos
Reply