FONT SIZE : AAA
The VHDL entity defines how a design element described in VHDL connects to other VHDL models and also defines the name of the model. The entity also allows the definition of any parameters that are to be passed into the model using hierarchy. The basic template for an entity is as follows:
1 entity <name> is
2 .
3 end entity <name>;
If the entity has the name test then the entity template could be either:
1 entity test is
2 end entity test;
or:
1 entity test is
2 end test;
The method of connecting entities together is using ports. These are defined in the entity using the following method:
1 port (
2 −− list of port declarations
3 );
The port declaration defines the type of connection and direction where appropriate. For example, the port declaration for an input bit called in1 would be:
1 in1 : in bit;
And if the model had two inputs (in1 and in2) of type bit and a single output (out1) of type bit then the declaration of the ports would be defined as follows:
1 port (
2 in1, in2 : in bit;
3 out1 : out bit
4 );
As the connection points between entities are effectively the same as those inter-process connections,they are effectively signals andc a
If the model has a parameter, then this is defined using generics. The general declaration of generics is shown below:
1 generic (
2 −− list of generic declarations
3 );
In the case of generics, the declaration is similar to that of a constant with the form as shown below:
1 param1 : integer := 4;
Taking an example of a model that had two generics, gain (integer) and time_delay (time), they could be defined in the entity as follows:
1 generic (
2 gain : integer := 4;
3 time_delay : time = 10 ns;
4 );
It is also possible to include model specific constants in the entity using the standard declaration of constants method previously described; for example:
1 constant : rpullup : real := 1000.0;
To illustrate a complete entity, we can bring together the ports and generics examples previously shown and construct the complete entity for this example:
1 entity test is
2 port (
3 in1, in2 : in bit;
4 out1 : out bit;
5 );
6 generic (
7 gain : integer := 4;
8 time_delay : time := 10 ns;
9 );
10 constant : rpullup : real := 1000.0;
11 end entity test;
Manufacturer:Xilinx
Product Categories: FPGAs
Lifecycle:Active Active
RoHS:
Manufacturer:Xilinx
Product Categories: Disjoncteur
Lifecycle:Active Active
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories: FPGAs
Lifecycle:Active Active
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories:
Lifecycle:Obsolete -
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories:
Lifecycle:Active Active
RoHS: -
Support