首先在结构体中声明元件:
COMPONENT <元件名>
GENERIC(类属参数说明);
PORT(端口参数列表);
END COMPONENT;
[<标号>:] <元件名> [GENERIC MAP(参数映射);]
PORT MAP(端口映射);
例如:
COMPONENT and_gate
GENERIC (delay : time);
PORT(a , b : in std_logic;
c : out std_logic);
END COMPONENT;
U1: and_gate GENERIC MAP (10ns);
PORT MAP(in1=>a,in2=>b,out=>c);