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

📄 indicator.vhd

📁 VHDL source code for test machine.
💻 VHD
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

--  Uncomment the following lines to use the declarations that are
--  provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;

entity indicator is
	port ( RESET  : in std_logic;
			 CLK_IN : in std_logic;
			 Indy	  : out std_logic;
			 nIndy  : out std_logic
			);
end indicator;

architecture Behavioral of indicator is

	signal Q : std_logic_vector(22 downto 0);

begin

process ( RESET, CLK_IN )
begin
	if RESET = '1'	then Q <=( others=> '0');
	elsif CLK_IN'event AND CLK_IN = '1' then Q <=Q+1;
	end if;

	Indy <=Q(22);
	nIndy <=not Q(22);
end process;

end Behavioral;

⌨️ 快捷键说明

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