Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Honored Contributor I
1,147 Views

How to use Median Fillter 2D

Hi,everyone! 

I am trying to use the IPs in the SOPCBuilder to do some Image processing. 

In SOPCBuilder,I add the Median Fillter 2D from Video and Image Processing,  

it showed errors as follow : 

Error: my_alt_vip_med.dout: "my_alt_vip_med.dout" must be connected to an Avalon-ST sink 

Error: my_alt_vip_med.din: "my_alt_vip_med.din" must be connected to an Avalon-ST source 

what to do next?  

 

What are Avalon-ST sink and Avalon-ST source? 

Can I find them in the left list of SOPCBuilder ,or must I have to write the interface with HDL?
0 Kudos
6 Replies
Honored Contributor I
19 Views

Mostly of the altera signal processing ip cores use the avalon streaming interface. 

 

You must instantiate several FSMs for the source and sink of data.
0 Kudos
Honored Contributor I
19 Views

I suggest tyou to have a look at 

 

http://www.altera.com/literature/hb/qts/qts_qii54021.pdf?gsa_pos=3&wt.oss_r=1&wt.oss=avalon%20st 

 

and 

 

http://www.altera.com/literature/fs/fs_avalon_streaming.pdf?gsa_pos=6&wt.oss_r=1&wt.oss=avalon%20st 

 

with those documents you will easily understand the properties of the Avalon Streaming interface and how the components should be connected to thet interface. A source and a sink are simply components that, in your processing chain, are connected just before and just after your filter.
0 Kudos
Honored Contributor I
19 Views

Thanks for your help,OrchestraDirector! 

I want to use the component in niosii system,what should I do ?
0 Kudos
Honored Contributor I
19 Views

You have to understand which component is generating the signal which feeds your median filter, and that will be the source component to be connected to your filter. On the other side, there must be another component to be connected at the ouput of your median filter (the sink). 

I don't know if you need better understanding of the Nios II development, you may have a look at: 

 

http://www.altera.com/literature/tt/tt_nios2_hardware_tutorial.pdf
0 Kudos
Honored Contributor I
19 Views

There is a video and image processing SOPC Builder example design that may be a good starting point. The data path contains a chain of video processing megacore functions (deinterlacer, scaler, color space conversion, chroma resampler, mixer, frame buffer, color plane sequencer, test pattern generator) and a Nios II processor for control and configuration. The example takes in composite video (NTSC) and format converts to DVI (1024x768). It contains software control code and class APIs to make it easier to interface to the video megacore functions that have run-time control interfaces (Av-MM). It runs on the 3C120 board (video dev kit from Bitec). The median filter doesn't have a control interface, but you could just drop it into the datapath, say, connecting the input to the output of the scaler and the output to the input of the mixer. See the app note (an427.pdf) at 

http://www.altera.com/support/refdesigns/sys-sol/broadcast/ref-post-processing.html?gsa_pos=1&wt.oss...  

All the connections in SOPCB are Av-ST (for data streaming point to point connections) and Av-MM (read/write address based bus transactions). The VIP Suite functions use a protocol called Av-ST Video to transmit video between them. You can use the clocked video input and clocked video output blocks (video and image processing->IO in SOPCB component list) to bridge between various video standards (BT656, VGA, DVI) and Av-ST Video to get video on and off the chip.  

Hope this helps.
0 Kudos
Honored Contributor I
19 Views

Hello  

 

I am new to image processing. I am trying to use the 2D median filter with nios. But I am not clear how to instantiate the median filter.  

 

nios_camcontrol_med u0 ( 

.clk_clk (<connected-to-clk_clk>), // clk.clk 

.reset_reset_n (<connected-to-reset_reset_n>), // reset.reset_n 

.ccd_controller_0_export_s1_key (<connected-to-ccd_controller_0_export_s1_key>), // ccd_controller_0_export_s1.key 

.ccd_controller_0_export_s1_sw (<connected-to-ccd_controller_0_export_s1_sw>), // .sw 

.key_pio_external_connection_export (<connected-to-key_pio_external_connection_export>), // key_pio_external_connection.export 

.sw_pio_external_connection_export (<connected-to-sw_pio_external_connection_export>), // sw_pio_external_connection.export 

.alt_vip_med_0_din_ready (<connected-to-alt_vip_med_0_din_ready>), // alt_vip_med_0_din.ready 

.alt_vip_med_0_din_valid (<connected-to-alt_vip_med_0_din_valid>), // .valid 

.alt_vip_med_0_din_data (<connected-to-alt_vip_med_0_din_data>), // .data 

.alt_vip_med_0_din_startofpacket (<connected-to-alt_vip_med_0_din_startofpacket>), // .startofpacket 

.alt_vip_med_0_din_endofpacket (<connected-to-alt_vip_med_0_din_endofpacket>), // .endofpacket 

.alt_vip_med_0_dout_ready (<connected-to-alt_vip_med_0_dout_ready>), // alt_vip_med_0_dout.ready 

.alt_vip_med_0_dout_valid (<connected-to-alt_vip_med_0_dout_valid>), // .valid 

.alt_vip_med_0_dout_data (<connected-to-alt_vip_med_0_dout_data>), // .data 

.alt_vip_med_0_dout_startofpacket (<connected-to-alt_vip_med_0_dout_startofpacket>), // .startofpacket 

.alt_vip_med_0_dout_endofpacket (<connected-to-alt_vip_med_0_dout_endofpacket>) // .endofpacket 

); 

 

 

I have done the CCD_controller part. Now I am trying to use the median filter. I have read the ALTERA_video_ip_suite and get only some idea about those signals. But I dont know how can I use those. Specially, I need to know the value of the following signals: 

 

din_ready,  

dout_ready,  

dout_valid,  

din_valid,  

din_startofpacket,  

din_endofpacket,  

dout_startofpacket,  

dout_endofpacket 

 

Can anyone help me about this. 

 

Thanks and regards 

Rupok
0 Kudos