Advanced Topics 219
ATTRIBUTE location : INTEGER;
END p_attr;
USE WORK.p_attr.ALL;
ENTITY board IS
PORT(
.
.
.
);
END board;
ARCHITECTURE cpu_board OF board IS
COMPONENT mc68040
GENERIC(...... );
PORT(
.
.
.
);
END COMPONENT;
SIGNAL a : INTEGER;
SIGNAL b : t_package_type;
ATTRIBUTE package_type OF mc68040 : COMPONENT IS pin_grid;
ATTRIBUTE location OF mc68040 : COMPONENT IS 20;
BEGIN
a <= mc68040’location;
-- returns 20
b <= mc68040’package_type;
-- returns pin_grid
END cpu_board;
This is a very simple example of how attributes can be attached to
objects. Much more complicated types and attributes can be created. What
this example shows is a code fragment of a CPU board design in which
the package type and location information are specified as attributes of
the single microprocessor used in the design.
The package_typeattribute is used to hold the kind of packaging
used for the microprocessor. Attributes that have values specified do not
have to be used in the simulation. Other tools such as physical layout
tools or fault simulation can make use of attributes that a logic simu-
lator cannot.
In this example, a physical layout tool could read the package type
information from the package_typeattribute and, based on the value
assigned to the attribute, fill in the value for the location attribute.