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

📄 decod_2bits.vhd

📁 这个是国外大学的项目代码
💻 VHD
字号:
------------------------------------------------------------------------
--  decod_2bits.vhd -- 
------------------------------------------------------------------------
--  Authors : Albert Zemba & Mihai Cucicea
------------------------------------------------------------------------
-- Software version: Xilinx ISE 7.1i 
--                   WebPack
------------------------------------------------------------------------
-- This source file contains the decod_2bits component
------------------------------------------------------------------------
--  Behavioral description
-- A 2 bits decoder
------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity decod_2bits is
	port( i:in std_logic_vector (1 downto 0);
			o0,o1,o2,o3:out std_logic
		 );
end decod_2bits;

architecture Behavioral of decod_2bits is

begin

	process (i)
	begin
		if (i="00") then o0<='0'; o1<='1'; o2<='1'; o3<='1'; end if;
		if (i="01") then o0<='1'; o1<='0'; o2<='1'; o3<='1'; end if;
		if (i="10") then o0<='1'; o1<='1'; o2<='0'; o3<='1'; end if;
		if (i="11") then o0<='1'; o1<='1'; o2<='1'; o3<='0'; end if;
	end process;

end Behavioral;

⌨️ 快捷键说明

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