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

📄 sinc_h.vhd

📁 simple thermometr in vhdl
💻 VHD
字号:
------------------------------------------------------------------------------------ Bufon, Ferluga-- Progetto elettronica 2 FPGA-- Termometro visualizzato su VGA------------------------------------------------------------------------------------Blocco per il sincronismo orizzontalelibrary IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;--Dichiarazione variabili d'ingresso e di uscita:entity sinc_h is										  	Port(	clk: in std_logic;				  		           	pixel : in std_logic;						color: in std_logic;						bla: in std_logic;							end_l: out std_logic;					    		hs : out std_logic;					               rgb : out std_logic_vector(5 downto 0);	               dot1 : inout std_logic_vector(9 downto 0));	end sinc_h;architecture Behavioral of sinc_h is-- Variabili interne 	signal count: std_logic_vector(9 downto 0);	signal dot: std_logic_vector(9 downto 0);beginA:	process (clk)	begin				if (clk='1' and clk'event) then 		-- nel caso di impulso clock incrementa il contatore fino a fine linea			count<=count+1;						if (count=799) then							count<="0000000000";					end_l<='1';						end if;								if (count=0) then							end_l<='0';						end if;							end if;						end process;B:	process (clk)	begin	if (clk='1' and clk'event) then		-- nel caso di impulso di clock genera i segnali di sincronismo	-- e aggiorna l'uscita rgb dove necessario			if (count >= 95 and count < 135) then									hs<='1';					rgb<="000000";				end if;			if (count >=135 and count <775 and bla='1') then						dot<=dot+"0000000001";									if (pixel='1') then											if (dot<=3) then						rgb<="000000";					else						if (color='0') then							rgb<="000011"; --nel caso della temperatura >=0 utilizza il colore rosso per scrivere su schermo						else							rgb<="110000"; --nel caso della temperatura <0 utilizza il colore blu per scrivere su schermo								end if;					end if;				else														rgb<="000000";										end if;												dot1<=dot;			end if;											if (count >= 775 and count < 800) then						dot<="0000000000";									dot1<="0000000000";				rgb<="000000";									end if;											if (count < 95 ) then						rgb<="000000";							hs<='0';							end if;						end if;							end process;															  end Behavioral;

⌨️ 快捷键说明

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