文档介绍:基本语法元件例化与层次设计
VHDL层次化结构模型
元件例化
2. 元件例化语句──用来引用元件的并行语句。
当一个实体引用一个元件时,使用元件例化语句。元件例化语句指定该实例元件对应的元件模型,并且指定了元件模型端口与实体中信号的关联关系。
例如:
architecture Parent_body of Parent is
component And2
port(I1, I2: Bit; O1: out Bit);
ponent;
signal Sl,32,S3: Bit;
begin
Child: And2 port map(I1=>S1,I2=>S2,O1=>S3);
end Parent-body;
VHDL层次化结构模型
元件例化
一个实体的结构体中引用某些元件,ponent instantiation),用元件例化语句表示。该元件称为实例元件或例化元件(instance)。各元件例化语句的执行顺序与书写顺序无关。
1. 元件声明——声明要调用某种模型的元件。
要引用的元件必须预先声明,称为元件声明。元件声明通常放在该结构体的声明部分,也可以放在一个程序包中。
来源:/Article/HDL/VHDL/200508/
VHDL: Creating a Hierarchical Design
This example describes how to create a hierarchical design using VHDL.
The top-level design, called , implements an instance of the function .
In the file, ponent for the logic function is declared inside the architecture in which it is instantiated.
ponent Declaration defines the ports of the lower-level function.
-----------------------------------------------------------------------------
(Top-level file)
LIBRARY ieee;
USE ;
ENTITY top IS
PORT(w_in, x_in, y_in :IN std_logic;
clock :IN std_logic;
z_out :OUT std_logic);
END top;
ARCHITECTURE a OF top IS
COMPONENT logic
PORT(a,b,c :IN std_logic;
x :OUT std_logic);
PONENT;
SIGNAL w_reg, x_reg, y_reg, z_reg :std_l