t172.vhd

来自「Workshop vhdl code from Esperan」· VHDL 代码 · 共 21 行

VHD
21
字号
--
-- This file tests support for resource sharing whith mutually exclusive expressions.
-- Only one adder and mux should result from this code.
--
entity TEST is 
	port( SEL   : in bit;
	      A,B,C : in integer range 0 to 7;
	      Y     : out integer range 0 to 15);
end TEST;
architecture T172 of TEST is
begin
	process(A, B, C, SEL)
	begin
		if SEL='1' then 
			Y <= A + B;
		else
			Y <= A + C;
		end if;
	end process;
end T172;

⌨️ 快捷键说明

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