⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sv_chip0.vhd

📁 Stereo-Vision circuit description, Aug 2002, Ahmad Darabiha This design contains four top level ci
💻 VHD
📖 第 1 页 / 共 3 页
字号:
					tm3_vidout_vsync <= '0';				end if;				if ((horiz >= 664) AND (horiz <= 760)) then					tm3_vidout_hsync <= '1';				else					tm3_vidout_hsync <= '0';				end if;				if ((horiz < 640) AND (vert < 480)) then					tm3_vidout_blank <= '1';				else					tm3_vidout_blank <= '0';				end if;									tm3_sram_adsp <= '1';				tm3_sram_we <= "11111111";				tm3_sram_data <= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";				--tm3_sram_oe <= "11";				case horiz(2 downto 0) is 			    when "000" => 			        	tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 						tm3_vidout_green <= "0000000000"; 						tm3_vidout_blue <= "0000000000"; 						depth_out_reg <= vidout_buf(15 downto 8);					else 						tm3_vidout_red <= vidout_buf(15 downto 8) & "00";						tm3_vidout_green <= vidout_buf(15 downto 8) & "00";						tm3_vidout_blue <= vidout_buf(15 downto 8) & "00";					end if;				when "001" => 					tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000"; 						tm3_vidout_blue <= "0000000000"; 						depth_out_reg <= vidout_buf(23 downto 16);					else 						tm3_vidout_red <= vidout_buf(23 downto 16) & "00";				        tm3_vidout_green <= vidout_buf(23 downto 16) & "00";						tm3_vidout_blue <= vidout_buf(23 downto 16) & "00";											end if;				when "010" => 					tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000";						tm3_vidout_blue <= "0000000000";						depth_out_reg <= vidout_buf(31 downto 24);										else 						tm3_vidout_red <= vidout_buf(31 downto 24) & "00";				        tm3_vidout_green <= vidout_buf(31 downto 24) & "00";						tm3_vidout_blue <= vidout_buf(31 downto 24) & "00";					end if;								when "011" => 					tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000";						tm3_vidout_blue <= "0000000000";						depth_out_reg <= vidout_buf(39 downto 32);					else 						tm3_vidout_red <= vidout_buf(39 downto 32) & "00";				        tm3_vidout_green <= vidout_buf(39 downto 32) & "00";						tm3_vidout_blue <= vidout_buf(39 downto 32) & "00";					end if;								when "100" => 					tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000";						tm3_vidout_blue <= "0000000000";						depth_out_reg <= vidout_buf(47 downto 40);					else 						tm3_vidout_red <= vidout_buf(47 downto 40) & "00";				        tm3_vidout_green <= vidout_buf(47 downto 40) & "00";						tm3_vidout_blue <= vidout_buf(47 downto 40) & "00";					end if;								when "101" => 					tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000";						tm3_vidout_blue <= "0000000000";						depth_out_reg <= vidout_buf(55 downto 48);					else 						tm3_vidout_red <= vidout_buf(55 downto 48) & "00";				        tm3_vidout_green <= vidout_buf(55 downto 48) & "00";						tm3_vidout_blue <= vidout_buf(55 downto 48) & "00";					end if;									when "110" => 					tm3_sram_oe <= "10";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000"; 						tm3_vidout_blue <= "0000000000";						depth_out_reg <= vidout_buf(63 downto 56);					else 						tm3_vidout_red <= vidout_buf(63 downto 56) & "00";				        tm3_vidout_green <= vidout_buf(63 downto 56) & "00";						tm3_vidout_blue <= vidout_buf(63 downto 56) & "00";					end if;								when "111" => 					tm3_sram_oe <= "11";					--if (horiz(9 downto 3) = x_reg(9 downto 3)) and (vert(9 downto 3) = y_reg(9 downto 3)) then 										if (horiz <= x_reg_r)and(horiz >= x_reg_l)and(vert <= y_reg_dn)and(vert >= y_reg_up) then 											tm3_vidout_red <= "1111111111"; 				        tm3_vidout_green <= "0000000000";						tm3_vidout_blue <= "0000000000";						depth_out_reg <= vidout_buf(7 downto 0);					else 						tm3_vidout_red <= vidout_buf(7 downto 0) & "00";				        tm3_vidout_green <= vidout_buf(7 downto 0) & "00";						tm3_vidout_blue <= vidout_buf(7 downto 0) & "00";					end if; 				end case;							else				tm3_sram_adsp <= '0';								case horiz(2 downto 0) is					when "000" =>					--	vidout_buf <= tm3_sram_data;						tm3_sram_addr <= vidin_addr_buf_sc_2;						tm3_sram_we <= "00000000";						tm3_sram_oe <= "11";						tm3_sram_data <= vidin_data_buf_sc_2;									when "100" =>					--	vidout_buf <= tm3_sram_data;						tm3_sram_addr <= vidin_addr_buf_sc_4;						tm3_sram_we <= "00000000";						tm3_sram_oe <= "11";						tm3_sram_data <= vidin_data_buf_sc_4;										when "110" => 						 --if vert(8)= '0' then					    --  tm3_sram_addr <= "00000" & vert(7 downto 0) & horiz(8 downto 3);						                    --  tm3_sram_we <= "11111111";						--	tm3_sram_oe <= "11";						--	tm3_sram_data <= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";											 --else 							tm3_sram_addr <= "00101" & vert(7 downto 0) & horiz(8 downto 3);												tm3_sram_we <= "11111111";							tm3_sram_oe <= "11";							tm3_sram_data <= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";										     --end if; 										when "111" =>						vidout_buf <= tm3_sram_data;						tm3_sram_addr <= vidin_addr_buf_sc_1;						tm3_sram_we <= "00000000";						tm3_sram_oe <= "11";						tm3_sram_data <= vidin_data_buf_sc_1;										when others =>						 tm3_sram_addr <= "0000000000000000000";								             tm3_sram_we <= "11111111";						 tm3_sram_oe <= "11";					     tm3_sram_data <= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";										end case;			end if;			if (vidin_new_data_scld_1_2to3_left_reg = '1')   then  			       		   	 case (svid_comp_switch_2to3 & vidin_addr_reg_2to3_reg(2 downto 0)) is				when "0000" =>					vidin_data_buf_2_sc_1(7 downto 0) <= vidin_data_reg_scld_1_2to3_left_reg; 					vidin_data_buf_2_sc_2(7 downto 0) <= vidin_data_reg_scld_2_2to3_left_reg; 					vidin_data_buf_2_sc_4(7 downto 0) <= vidin_data_reg_scld_4_2to3_left_reg; 									when "0001" =>					vidin_data_buf_2_sc_1(15 downto 8) <= vidin_data_reg_scld_1_2to3_left_reg; 					vidin_data_buf_2_sc_2(15 downto 8) <= vidin_data_reg_scld_2_2to3_left_reg; 					vidin_data_buf_2_sc_4(15 downto 8) <= vidin_data_reg_scld_4_2to3_left_reg; 	      							when "0010" =>					vidin_data_buf_2_sc_1(23 downto 16) <= vidin_data_reg_scld_1_2to3_left_reg;					vidin_data_buf_2_sc_2(23 downto 16) <= vidin_data_reg_scld_2_2to3_left_reg;					vidin_data_buf_2_sc_4(23 downto 16) <= vidin_data_reg_scld_4_2to3_left_reg;									when "0011" =>					vidin_data_buf_2_sc_1(31 downto 24) <= vidin_data_reg_scld_1_2to3_left_reg;					vidin_data_buf_2_sc_2(31 downto 24) <= vidin_data_reg_scld_2_2to3_left_reg;					vidin_data_buf_2_sc_4(31 downto 24) <= vidin_data_reg_scld_4_2to3_left_reg;				when "0100" =>					vidin_data_buf_2_sc_1(39 downto 32) <= vidin_data_reg_scld_1_2to3_left_reg;					vidin_data_buf_2_sc_2(39 downto 32) <= vidin_data_reg_scld_2_2to3_left_reg;					vidin_data_buf_2_sc_4(39 downto 32) <= vidin_data_reg_scld_4_2to3_left_reg;									when "0101" =>					vidin_data_buf_2_sc_1(47 downto 40) <= vidin_data_reg_scld_1_2to3_left_reg;					vidin_data_buf_2_sc_2(47 downto 40) <= vidin_data_reg_scld_2_2to3_left_reg;					vidin_data_buf_2_sc_4(47 downto 40) <= vidin_data_reg_scld_4_2to3_left_reg;									when "0110" =>					vidin_data_buf_2_sc_1(55 downto 48) <= vidin_data_reg_scld_1_2to3_left_reg;					vidin_data_buf_2_sc_2(55 downto 48) <= vidin_data_reg_scld_2_2to3_left_reg;					vidin_data_buf_2_sc_4(55 downto 48) <= vidin_data_reg_scld_4_2to3_left_reg;			  					when "0111" =>				    vidin_data_buf_sc_1 <= vidin_data_reg_scld_1_2to3_left_reg & 					vidin_data_buf_2_sc_1(55 downto 0);				    vidin_data_buf_sc_2 <= vidin_data_reg_scld_2_2to3_left_reg & 					vidin_data_buf_2_sc_2(55 downto 0);			    vidin_data_buf_sc_4 <= vidin_data_reg_scld_4_2to3_left_reg & 					vidin_data_buf_2_sc_4(55 downto 0);		       					vidin_addr_buf_sc_1 <= "0000" & svid_comp_switch_2to3 								& vidin_addr_reg_2to3_reg(16 downto 3);									vidin_addr_buf_sc_2 <= "0001" & svid_comp_switch_2to3 								& vidin_addr_reg_2to3_reg(16 downto 3);						vidin_addr_buf_sc_4 <= "0010" & svid_comp_switch_2to3 								& vidin_addr_reg_2to3_reg(16 downto 3);					when "1000" =>					vidin_data_buf_2_sc_1(7 downto 0) <= vidin_data_reg_scld_1_2to3_right_reg; 					vidin_data_buf_2_sc_2(7 downto 0) <= vidin_data_reg_scld_2_2to3_right_reg; 					vidin_data_buf_2_sc_4(7 downto 0) <= vidin_data_reg_scld_4_2to3_right_reg; 									when "1001" =>					vidin_data_buf_2_sc_1(15 downto 8) <= vidin_data_reg_scld_1_2to3_right_reg; 					vidin_data_buf_2_sc_2(15 downto 8) <= vidin_data_reg_scld_2_2to3_right_reg; 					vidin_data_buf_2_sc_4(15 downto 8) <= vidin_data_reg_scld_4_2to3_right_reg; 	      							when "1010" =>					vidin_data_buf_2_sc_1(23 downto 16) <= vidin_data_reg_scld_1_2to3_right_reg;					vidin_data_buf_2_sc_2(23 downto 16) <= vidin_data_reg_scld_2_2to3_right_reg;					vidin_data_buf_2_sc_4(23 downto 16) <= vidin_data_reg_scld_4_2to3_right_reg;									when "1011" =>					vidin_data_buf_2_sc_1(31 downto 24) <= vidin_data_reg_scld_1_2to3_right_reg;					vidin_data_buf_2_sc_2(31 downto 24) <= vidin_data_reg_scld_2_2to3_right_reg;					vidin_data_buf_2_sc_4(31 downto 24) <= vidin_data_reg_scld_4_2to3_right_reg;									when "1100" =>					vidin_data_buf_2_sc_1(39 downto 32) <= vidin_data_reg_scld_1_2to3_right_reg;					vidin_data_buf_2_sc_2(39 downto 32) <= vidin_data_reg_scld_2_2to3_right_reg;					vidin_data_buf_2_sc_4(39 downto 32) <= vidin_data_reg_scld_4_2to3_right_reg;									when "1101" =>					vidin_data_buf_2_sc_1(47 downto 40) <= vidin_data_reg_scld_1_2to3_right_reg;					vidin_data_buf_2_sc_2(47 downto 40) <= vidin_data_reg_scld_2_2to3_right_reg;					vidin_data_buf_2_sc_4(47 downto 40) <= vidin_data_reg_scld_4_2to3_right_reg;									when "1110" =>					vidin_data_buf_2_sc_1(55 downto 48) <= vidin_data_reg_scld_1_2to3_right_reg;					vidin_data_buf_2_sc_2(55 downto 48) <= vidin_data_reg_scld_2_2to3_right_reg;					vidin_data_buf_2_sc_4(55 downto 48) <= vidin_data_reg_scld_4_2to3_right_reg;			  					when "1111" =>				    vidin_data_buf_sc_1 <= vidin_data_reg_scld_1_2to3_right_reg & 					vidin_data_buf_2_sc_1(55 downto 0);				    vidin_data_buf_sc_2 <= vidin_data_reg_scld_2_2to3_right_reg & 					vidin_data_buf_2_sc_2(55 downto 0);			    vidin_data_buf_sc_4 <= vidin_data_reg_scld_4_2to3_right_reg & 					vidin_data_buf_2_sc_4(55 downto 0);		       				vidin_addr_buf_sc_1 <= "0000" & svid_comp_switch_2to3 								& vidin_addr_reg_2to3_reg(16 downto 3);					vidin_addr_buf_sc_2 <= "0001" & svid_comp_switch_2to3 								& vidin_addr_reg_2to3_reg(16 downto 3);				vidin_addr_buf_sc_4 <= "0010" & svid_comp_switch_2to3 								& vidin_addr_reg_2to3_reg(16 downto 3);				end case;			end if;					end if;	end process;end arch_sv_chip0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -