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

📄 vga_rx.vhd

📁 many application on kit SP-3: VGA, digital clock, counter, interface PS2....
💻 VHD
📖 第 1 页 / 共 2 页
字号:
										('0','0','0','0','1','1','0','0'),										('0','0','0','1','1','0','0','0'),										('0','0','1','1','0','0','0','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','1','1','1','1','0')); 		CONSTANT N3 : Screen_Line1 :=(('0','0','1','1','1','1','0','0'),										('0','1','0','0','0','1','1','0'),										('0','0','0','0','0','1','1','0'),										('0','0','0','1','1','1','0','0'),										('0','0','0','1','1','1','0','0'),										('0','0','0','0','0','1','1','0'),										('0','1','0','0','0','1','1','0'),										('0','0','1','1','1','1','0','0')); 		CONSTANT N4 : Screen_Line1 :=(('0','1','1','0','0','0','0','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','0','1','1','0','0'),										('0','1','1','0','1','1','0','0'),										('0','1','1','1','1','1','1','0'),										('0','0','0','0','1','1','0','0')); 		CONSTANT N5 : Screen_Line1 :=(('0','1','1','1','1','1','1','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','1','1','1','1','0'),										('0','0','0','0','0','1','1','0'),										('0','0','0','0','0','1','1','0'),										('0','1','1','0','0','1','1','0'),										('0','0','1','1','1','1','1','0')); 		CONSTANT N6 : Screen_Line1 :=(('0','0','1','1','1','1','0','0'),										('0','1','1','0','0','0','1','0'),										('0','1','1','0','0','0','0','0'),										('0','1','1','1','1','1','0','0'),										('0','1','1','0','0','1','1','0'),										('0','1','1','0','0','1','1','0'),										('0','1','1','0','0','1','1','0'),										('0','0','1','1','1','1','1','0')); 		CONSTANT N7 : Screen_Line1 :=(('0','1','1','1','1','1','1','0'),										('0','1','1','1','1','1','1','0'),										('0','1','0','0','0','0','1','0'),										('0','0','0','0','0','1','1','0'),										('0','0','0','0','1','1','0','0'),										('0','0','0','1','1','0','0','0'),										('0','0','1','1','0','0','0','0'),										('0','0','1','0','0','0','0','0')); 		CONSTANT N8 : Screen_Line1 :=(('0','0','1','1','1','1','0','0'),										('0','1','0','0','0','0','1','0'),										('0','1','0','0','0','0','1','0'),										('0','0','1','1','1','1','0','0'),										('0','1','0','0','0','0','1','0'),										('0','1','0','0','0','0','1','0'),										('0','1','0','0','0','0','1','0'),										('0','0','1','1','1','1','0','0')); 		CONSTANT N9 : Screen_Line1 :=(('0','0','1','1','1','1','0','0'),										('0','1','1','0','0','1','1','0'),										('0','1','1','0','0','1','1','0'),										('0','0','1','1','1','1','1','0'),										('0','0','0','0','0','1','1','0'),										('0','0','0','0','0','1','1','0'),										('0','1','0','0','0','1','1','0'),										('0','0','1','1','1','1','0','0')); 		CONSTANT N0 : Screen_Line1 :=(('0','0','0','1','1','0','0','0'),										('0','0','1','0','0','1','0','0'),										('0','1','0','1','0','0','1','0'),										('0','1','0','0','1','0','1','0'),										('0','1','0','0','0','1','1','0'),										('0','1','0','0','0','0','1','0'),										('0','0','1','0','0','1','0','0'),										('0','0','0','1','1','0','0','0')); 											variable Line:integer:=0;variable Pixel:integer:=0;variable jmp:integer:=0;	begin		if Clk25'event and Clk25 = '1' then					if (Horizontal_Counter >= "0010010000" ) -- 144			and (Horizontal_Counter < "1100010000" ) -- 784			and (Vertical_Counter >= "0000100111" ) -- 39    		and (Vertical_Counter < "1000000111" ) -- 519			then				Red_out <= '0';				Green_out <= '0';				Blue_out <='0';								if (Horizontal_Counter >= "0101000000")--320-- "0101110110")-- 374   	--"0110100111" )--423				  and (Horizontal_Counter <= "1001100000")  --608 --"1000101010") --554	--"0111111001")--	505				  and (Vertical_Counter >=	"0011101100") --236				  and (Vertical_Counter <= "0011110011") then -- 243					if(Pixel <= (jmp+7)) then --Line 1 Lets make our Text WHITE						if sc = "00011100" then		--A													 Red_out <= A(Line, Pixel);							 Green_out <= A(Line, Pixel);							 Blue_out <= A(Line, Pixel);						elsif sc =  "00110010" then		--B										 Red_out <= B(Line, Pixel);							 Green_out <= B(Line, Pixel);							 Blue_out <= B(Line, Pixel);	 						elsif sc = "00100001" then		--C													 Red_out <= C(Line, Pixel);							 Green_out <= C(Line, Pixel);							 Blue_out <= C(Line, Pixel);	 						elsif sc = "00100011" then		--D																 Red_out <= D(Line, Pixel);							 Green_out <= D(Line, Pixel);							 Blue_out <= D(Line, Pixel);	 						elsif sc = "00100100" then	--E							 Red_out <= E(Line, Pixel);							 Green_out <= E(Line, Pixel);							 Blue_out <= E(Line, Pixel);									elsif sc = "00101011" then		--F																 Red_out <= F(Line, Pixel);							 Green_out <= F(Line, Pixel);							 Blue_out <= F(Line, Pixel);							 						elsif sc = "00110100" then		--G															 Red_out <= G(Line, Pixel);							 Green_out <= G(Line, Pixel);							 Blue_out <= G(Line, Pixel);														elsif sc = "00110011" then		--H														 Red_out <= H(Line, Pixel);							 Green_out <= H(Line, Pixel);							 Blue_out <= H(Line, Pixel);						elsif sc = "01000011" then		--I															 Red_out <= I(Line, Pixel);							 Green_out <= I(Line, Pixel);							 Blue_out <= I(Line, Pixel);											elsif sc = "00111011" then	--J													 Red_out <= J(Line, Pixel);							 Green_out <= J(Line, Pixel);							 Blue_out <= J(Line, Pixel);											elsif sc = "01000010" then		--K														 Red_out <= K(Line, Pixel);							 Green_out <= K(Line, Pixel);							 Blue_out <= K(Line, Pixel);											elsif sc = "01001011" then	--L							 Red_out <= L(Line, Pixel);							 Green_out <= L(Line, Pixel);							 Blue_out <= L(Line, Pixel);											elsif sc = "00111010" then		--M														 Red_out <= M(Line, Pixel);							 Green_out <= M(Line, Pixel);							 Blue_out <= M(Line, Pixel);										elsif sc = "00110001" then		--N												 Red_out <= N(Line, Pixel);							 Green_out <= N(Line, Pixel);							 Blue_out <= N(Line, Pixel);									elsif sc = "01000100" then		--O													 Red_out <= O(Line, Pixel);							 Green_out <= O(Line, Pixel);							 Blue_out <= O(Line, Pixel);											elsif sc = "01001101" then	--P							 Red_out <= P(Line, Pixel);							 Green_out <= P(Line, Pixel);							 Blue_out <= P(Line, Pixel);						elsif sc = "00010101" then		--Q														 Red_out <= Q(Line, Pixel);							 Green_out <= Q(Line, Pixel);							 Blue_out <= Q(Line, Pixel);									elsif sc = "00101101" then		--R													 Red_out <= R(Line, Pixel);							 Green_out <= R(Line, Pixel);							 Blue_out <= R(Line, Pixel);											elsif sc = "00011011" then		--S												 Red_out <= S(Line, Pixel);							 Green_out <= S(Line, Pixel);							 Blue_out <= S(Line, Pixel);											elsif sc = "00101100" then		--T													 Red_out <= T(Line, Pixel);							 Green_out <= T(Line, Pixel);							 Blue_out <= T(Line, Pixel);											elsif sc = "00111100" then	--U												 Red_out <= U(Line, Pixel);							 Green_out <= U(Line, Pixel);							 Blue_out <= U(Line, Pixel);											elsif sc = "00101010" then		--V													 Red_out <= V(Line, Pixel);							 Green_out <= V(Line, Pixel);							 Blue_out <= V(Line, Pixel);											elsif sc = "00011101" then	--W													 Red_out <= W(Line, Pixel);							 Green_out <= W(Line, Pixel);							 Blue_out <= W(Line, Pixel);												elsif sc = "00100010" then	--X													 Red_out <= X(Line, Pixel);							 Green_out <= X(Line, Pixel);							 Blue_out <= X(Line, Pixel);										elsif sc = "00110101"  then	--Y													 Red_out <= Y(Line, Pixel);							 Green_out <= Y(Line, Pixel);							 Blue_out <= Y(Line, Pixel);											elsif sc = "00011010" then		--Z													 Red_out <= Z(Line, Pixel);							 Green_out <= Z(Line, Pixel);							 Blue_out <= Z(Line, Pixel);											elsif sc = "00010110" then		--N1										 Red_out <= N1(Line, Pixel);							 Green_out <= N1(Line, Pixel);							 Blue_out <= N1(Line, Pixel);											elsif sc = "00011110" then		--N2													 Red_out <= N2(Line, Pixel);							 Green_out <= N2(Line, Pixel);							 Blue_out <= N2(Line, Pixel);										elsif sc = "00100110" then		--N3															 Red_out <= N3(Line, Pixel);							 Green_out <= N3(Line, Pixel);							 Blue_out <= N3(Line, Pixel);												elsif sc = "00100101" then		--N4													 Red_out <= N4(Line, Pixel);							 Green_out <= N4(Line, Pixel);							 Blue_out <= N4(Line, Pixel);												elsif sc = "00101110" then		--N5														 Red_out <= N5(Line, Pixel);							 Green_out <= N5(Line, Pixel);							 Blue_out <= N5(Line, Pixel);											elsif sc = "00110110"  then		--N6												 Red_out <= N6(Line, Pixel);							 Green_out <= N6(Line, Pixel);							 Blue_out <= N6(Line, Pixel);									elsif sc = "00111101" then		--N7													 Red_out <= N7(Line, Pixel);							 Green_out <= N7(Line, Pixel);							 Blue_out <= N7(Line, Pixel);											elsif sc = "00111110" then		--N8														 Red_out <= N8(Line, Pixel);							 Green_out <= N8(Line, Pixel);							 Blue_out <= N8(Line, Pixel);											elsif sc = "01000110" then		--N9							 Red_out <= N9(Line, Pixel);							 Green_out <= N9(Line, Pixel);							 Blue_out <= N9(Line, Pixel);											elsif sc = "01000101" then		--N0										 Red_out <= N0(Line, Pixel);							 Green_out <= N0(Line, Pixel);							 Blue_out <= N0(Line, Pixel);										 						end if;						Pixel:= Pixel+1;											elsif(Pixel >= (jmp+8)) then  -- All else BLACK						pixel := (jmp+8);						Red_out <= '0';						Green_out <= '0';						Blue_out <= '0';					end if;							end if;		--frame char			end if;			--frame VGA						if (Horizontal_Counter > "0000000000")and				(Horizontal_Counter < "0001100001" ) then -- 96+1    			hs_out <= '0';    		else      	  	hs_out <= '1';    		end if;						if (Vertical_Counter > "0000000000" )and      		(Vertical_Counter < "0000000011" ) then -- 2+1    			vs_out <= '0';    		else      			vs_out <= '1';    		end if;			Horizontal_Counter <= Horizontal_Counter+"0000000001";    		if (Horizontal_Counter="1100100000") then      		Vertical_Counter <= Vertical_Counter+"0000000001";      		Horizontal_Counter <= "0000000000";				Pixel:= 0;								if (Vertical_Counter >=	"0011101100") -- First Line				   and (Vertical_Counter <= "0011110011") then 												if (Line <= 7) then				  		Line:= Line+1;						elsif (Line >= 8) then				 		 Line:= 0;						end if;										end if;				    		end if;			    		if (Vertical_Counter="1000001001") then		          		Vertical_Counter <= "0000000000";				Line:= 0;    		end if;			  		end if;--CLK25end process;	 end Behavioral;

⌨️ 快捷键说明

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