FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

VIP issue

Altera_Forum
Honored Contributor II
827 Views

Hi, I'm working on a design based on VIP suite, in which I have a video signal coming from a camera that is mixed with a video signal from the VIP test pattern generator, using VIP Alpha blending mixer: everything works. If I replaced the VIP test pattern generator with a VIP module designed by myself, nothing works: the alpha blending mixer seems to detect a wrong frame format and the layer 1 is not visualized well. Using signal tap I can verify that the Avalon video streaming protocol of my module works fine. My question is: can I have a sample design for the source avalon video streaming to compare it with my own? I can attach the VHDL code if someone is interested 

Thanx in advance
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
102 Views

please attach some code and the signaltapdata from your control-packet

Altera_Forum
Honored Contributor II
102 Views

 

--- Quote Start ---  

please attach some code and the signaltapdata from your control-packet 

--- Quote End ---  

 

 

That's my state machine: 

 

process (av_reset,av_clk,state_streaming,av_st_ready,go_bit,width_val,height_val,blend_val,width_count,height_count) 

begin  

 

 

 

if (av_reset = '1') or (go_bit = '0') then 

--if (av_reset = '1') then 

 

 

width_count <= "0000000000000000"; 

height_count <= "0000000000000000";  

 

av_st_data_sig <= X"0000"; 

av_st_valid_sig <= '0'; 

av_st_start_pack_sig <= '0'; 

av_st_end_pack_sig <= '0'; 

 

state_streaming <= SEND_ID_CONTROL_PACK; 

 

 

elsif (rising_edge(av_clk)) then  

 

case state_streaming is  

 

 

 

when SEND_ID_CONTROL_PACK => 

av_st_data_sig <= X"00FF";  

av_st_end_pack_sig <= '0'; 

 

if (av_st_ready = '1') then 

av_st_start_pack_sig <= '1'; 

av_st_valid_sig <= '1'; 

 

state_streaming <= SEND_CONTROL_1PACK;  

else 

av_st_start_pack_sig <= '0'; 

av_st_valid_sig <= '0'; 

 

state_streaming <= SEND_ID_CONTROL_PACK; 

end if;  

 

 

when SEND_CONTROL_1PACK => 

 

av_st_data_sig <= "0000" & width_val_std(11 downto 8) & "0000" & width_val_std(15 downto 12);  

av_st_start_pack_sig <= '0';  

 

if (av_st_ready = '1') then 

av_st_valid_sig <= '1'; 

state_streaming <= SEND_CONTROL_2PACK; 

else 

av_st_valid_sig <= '0'; 

state_streaming <= SEND_CONTROL_1PACK; 

end if;  

 

 

when SEND_CONTROL_2PACK => 

 

av_st_data_sig <= "0000" & width_val_std(3 downto 0) & "0000" & width_val_std(7 downto 4);  

av_st_start_pack_sig <= '0';  

 

if (av_st_ready = '1') then 

av_st_valid_sig <= '1'; 

state_streaming <= SEND_CONTROL_3PACK; 

else 

av_st_valid_sig <= '0'; 

state_streaming <= SEND_CONTROL_2PACK; 

end if;  

 

 

 

when SEND_CONTROL_3PACK => 

 

av_st_data_sig <= "0000" & height_val_std(11 downto 8) & "0000" & height_val_std(15 downto 12);  

av_st_start_pack_sig <= '0';  

 

if (av_st_ready = '1') then 

av_st_valid_sig <= '1'; 

state_streaming <= SEND_CONTROL_4PACK; 

else 

av_st_valid_sig <= '0'; 

state_streaming <= SEND_CONTROL_3PACK; 

end if;  

 

 

when SEND_CONTROL_4PACK => 

 

av_st_data_sig <= "0000" & height_val_std(3 downto 0) & "0000" & height_val_std(7 downto 4) ;  

av_st_start_pack_sig <= '0';  

 

if (av_st_ready = '1') then 

av_st_valid_sig <= '1'; 

state_streaming <= SEND_CONTROL_5PACK; 

else 

av_st_valid_sig <= '0'; 

state_streaming <= SEND_CONTROL_4PACK; 

end if;  

 

 

 

when SEND_CONTROL_5PACK => 

 

--av_st_data_sig <= X"000" & "0011";  

av_st_data_sig <= X"000" & "0010"; 

av_st_start_pack_sig <= '0';  

 

if (av_st_ready = '1') then 

av_st_valid_sig <= '1'; 

av_st_end_pack_sig <= '1';  

--state_streaming <= SEND_ID_VIDEO_PACK; 

state_streaming <= WAIT1CYCLE; 

else 

av_st_valid_sig <= '0'; 

av_st_end_pack_sig <= '0'; 

state_streaming <= SEND_CONTROL_5PACK; 

end if;  

 

 

 

 

 

 

when WAIT1CYCLE => 

av_st_start_pack_sig <= '0';  

av_st_valid_sig <= '0'; 

av_st_end_pack_sig <= '0';  

 

state_streaming <= SEND_ID_VIDEO_PACK; 

 

 

when SEND_ID_VIDEO_PACK => 

 

av_st_data_sig <= X"0000";  

av_st_end_pack_sig <= '0'; 

 

 

--if (av_st_ready = '1') and (go_bit = '1') then 

if (av_st_ready = '1') then 

av_st_start_pack_sig <= '1'; 

av_st_valid_sig <= '1'; 

 

state_streaming <= SEND_VIDEO_PACK; 

else 

av_st_start_pack_sig <= '0'; 

av_st_valid_sig <= '0'; 

 

state_streaming <= SEND_ID_VIDEO_PACK; 

end if;  

 

 

when SEND_VIDEO_PACK => 

 

 

 

av_st_data_sig <= X"1080"; --è il nero 

 

av_st_start_pack_sig <= '0';  

 

if (av_st_ready = '1') then 

width_count <= width_count + 1; 

av_st_valid_sig <= '1';  

else 

width_count <= width_count; 

av_st_valid_sig <= '0'; 

end if;  

 

if ((width_count = (width_val - 1) ) and (height_count = (height_val - 1))) then 

av_st_end_pack_sig <= '1'; 

else 

av_st_end_pack_sig <= '0'; 

end if; 

 

if ((width_count = (width_val - 1) ) and (av_st_ready = '1')) then 

state_streaming <= CHECK_END_FRAME; 

else 

state_streaming <= SEND_VIDEO_PACK; 

end if; 

 

when CHECK_END_FRAME =>  

 

width_count <= "0000000000000000"; 

 

av_st_valid_sig <= '0'; 

av_st_start_pack_sig <= '0'; 

av_st_end_pack_sig <= '0'; 

 

if (height_count = (height_val - 1)) then 

--FRAME TERMINATO 

height_count <= "0000000000000000"; 

 

state_streaming <= SEND_ID_CONTROL_PACK; 

else 

height_count <= height_count + 1; 

 

state_streaming <= SEND_VIDEO_PACK; 

end if; 

 

 

when others =>  

state_streaming <= SEND_ID_CONTROL_PACK; 

 

end case; 

end if;  

 

 

 

 

end process;
Reply