fpga_feixiang 发表于 2017-11-22 14:46:25

vhdl中元件例化

首先在结构体中声明元件:
COMPONENT <元件名>
      GENERIC(类属参数说明);
      PORT(端口参数列表);
END COMPONENT;
[<标号>:] <元件名>   
                                 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);
页: [1]
查看完整版本: vhdl中元件例化