VHDL Programming

(C. Jardin) #1

Configurations 181


END FOR;

END FOR;

END decode_eacon;

This configuration looks very similar to the lower-level configuration style
except for the USEclause in the component specification. In the previous
example, a configuration was specified, but in this style, an entity-
architecture pair is specified. The architecture is actually optional. If no
architecture is specified, the last compiled architecture for the entity is used.
Let’s take another look at the FORclause for the first inverter,I1.In
the preceding example, the component is still specified by the label or by
an ALLor OTHERSclause. In this example, a USE ENTITYclause follows.
This clause specifies the name of the entity to use for this component.
The entity can have a completely different name than the component
being specified. The component name comes from the component decla-
ration in the architecture, while the entity name comes from the actual
entity that has been compiled in the library specified. Following the entity
is an optional architecture name that specifies which architecture to use
for the entity.
Notice that the OTHERSclause is used for the second inverter in this
example. The first inverter is configured from its label I1, and all com-
ponents that have not yet been configured are configured by the OTHERS
clause. This capability allows component I1to use an architecture that
is different from the other components to describe its behavior. This
concept allows mixed-level modeling to exist. One component can be mod-
eled at the switch or gate level, and the other can be modeled at the be-
havior level.
To change the architecture used for a component with the first config-
uration,decode_llconrequires modifying the lower-level configuration
and recompiling, then recompiling any higher-level configurations that
depend on it. With the second configuration decode_eacon, changing the
architecture for a component involves modifying configuration
decode_eaconand recompiling. No other configurations need be recompiled.

Port Maps


In the last two examples of component configurations, default mapping of
entity ports and component ports was used. When the port names for an
entity being configured to a component match the component port names,
Free download pdf