Configurations 179
PORT MAP(nota, en, b, Q2);
A4 : and3
PORT MAP(a, en, b, Q3);
END structural;
When all of the entities and architectures have been compiled into the
working library, the circuit can be simulated. The simulator uses the last
compiled architecture to build the executable design for the simulator
because it is the default. Using the last compiled architecture for an
entity to build the simulator works fine in a typical system, until more
than one architecture exists for an entity. Then it can become confusing
as to which architecture was compiled last. A better method is to specify
exactly which architecture to use for each entity. The component configu-
ration binds architectures to entities.
Two different styles can be used for writing a component configura-
tion for an entity. The lower-level configuration style specifies lower-
level configurations for each component, and the entity-architecture
style specifies entity-architecture pairs for each component. The word
style is used to describe these two different configurations because
there is no hard-and-fast rule about how to use them. Lower-level con-
figurations can be mixed with entity-architecture pairs, creating a
mixed-style configuration.
Lower-Level Configurations
Let’s examine the configuration for the lower-level configuration style
first. Following is an example of such a configuration for the decode entity:
CONFIGURATION decode_llcon OF decode IS
FOR structural
FOR I1 : inv USE CONFIGURATION WORK.invcon;
END FOR;
FOR I2 : inv USE CONFIGURATION WORK.invcon;
END FOR;
FOR ALL : and3 USE CONFIGURATION WORK.and3con;
END FOR;
END FOR;
END decode_llcon;