📄 t173.vhd
字号:
--
-- This file tests support for resourse sharing when using mutually exclusive
-- function calls.
-- Only one adder and one mux should result from the synthesis of that 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 T173 of TEST is
function PLUS(A, B :integer) return integer is
begin
return (A + B);
end PLUS;
begin
process(A, B, C, SEL)
begin
if SEL='1' then
Y <= PLUS(A, B);
else
Y <= PLUS(A, C);
end if;
end process;
end T173;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -