v6_3.vhd

来自「台湾全华科技VHDL教材实例」· VHDL 代码 · 共 38 行

VHD
38
字号
library ieee;
use ieee.std_logic_1164.all;

entity V6_3 is 
	port(Sel     : in  std_logic_vector(3 downto 0);
	     Ina	 : in  std_logic;
	     Inb	 : in  std_logic;
	     Inc	 : in  std_logic;
	     Ind	 : in  std_logic;
	     Ine	 : in  std_logic;	     
	     Clk     : in  std_logic;
	     Reset   : in  std_logic;
	     OutD    : out std_logic);
end V6_3;

architecture A of V6_3 is

begin
	process(Reset,Clk)
	begin
		if Reset = '0' then
			OutD <= '0';
		elsif Clk = '1' and Clk'event then
			if Sel(3) = '0' then
				OutD <= Ina; 
			elsif Sel(2) = '0' then
				OutD <= Inb; 
			elsif Sel(1) = '0' then
				OutD <= Inc; 
			elsif Sel(0) = '0' then
				OutD <= Ind; 
			else
				OutD <= Ine; 
			end if;
		end if;
	end process;
end A;	

⌨️ 快捷键说明

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