Sie sind auf Seite 1von 35

Configurations

Primary design unit (many design entities, each with several architectures) to bind component instances to entities Configuration for an entity-architecture combination is compiled into the library, a simulatable object is created Configuration specifies the design entity used in place of each component instance Configuration specifies the architecture to be used for each design entity Configurations can also be used to specify generic values for components instantiated in the architecture configured

Configuration can also be used to provide a very fast substitution capability.

Default Configuration
Simplest form (last architecture compiled is used for an entity) of explicit configuration Can be used for models that do not contain any blocks or components to configure. Specifies the configuration name, the entity being configured, and the architecture to be used for the entity

Automatically connect a COMPONENT to an ENTITY The advantages by using a default configuration are that it is simple and that it may be overwritten by a configuration declaration The disadvantages are that the ENTITY must match the COMPONENT perfectly and that it is not unambiguously defined which ARCHITECTURE that will be used

Syntax:
CONFIGURATION configuration_name OF entity_name IS -- configuration declarations FOR architecture_name -- other FOR clauses END FOR; END [CONFIGURATION] [configuration_name];

An eg:

Two different architectures of counter entity is configured using two default configurations The first configuration small_count binds ARCHITECTURE count_255 with ENTITY counter to form a simulatable object small_count The second configuration binds ARCHITECTURE count_64k with ENTITY counter and forms a simulatable object called big_count

Component configuration
Architectures that contain instantiated components can be configured Architectures that contain other components are called structural architectures, they are configured through component configuration statements

Syntax:
CONFIGURATION configuration_name OF entity_name IS -- configuration declarations FOR architecture_name FOR instance_label : component_name USE ENTITY library_name.entity_name(arch_name); END FOR; -- other FOR clauses END FOR; END [CONFIGURATION] [configuration_name];

An eg: Simple 2:4 decoder

Gate level schematic

Components using VHDL description:


--Inverter --AND

ENTITY and ARCHITECTURE for decoder:

When all of the entities and architectures have been compiled into the working library, the circuit can be simulated Default is last compiled architecture

Two styles can be used for component configuration for an entity


Lower-level configuration Entity-architecture Lower-level specifies lower-level configuration for each component Entity-architecture specifies entity-architecture pairs for each component

Lower-level configurations For decoder:

Configuration specifies which configuration (already exists in library) to use each component in architecture structural of entity decode FOR clause to begin configuration and END FOR clause to end configuration Component instantiation label I1 or ALL or OTHERS USE CONFIGURATION clause specifies which configuration to use for this instance of component

I1 uses the configuration called invcon from the working library Names of entities, architectures, and configurations reflect a naming convention Advantage: Easy to write and understand Disadvantage: Not able to change the configuration of a lower-level component

Entity-architecture pair configuration


An eg:

Similar to low-level, but USE clause in the component specification If no architecture is specified, last compiled architecture for the entity is used USE ENTITY clause specifies the name of the entity to use for this component Label I1 and A1 allows component to use an architecture that is different from the other components to describe its behavior

Port Map
When port names for an entity is configured to a component match the component port names, default mapping is only required Similar to component instantiation port map clause used in architecture Specifies which of the component port map to the actual ports of the entity

The entity and architecture is same , however configuration needs to add the port map clause shown below

Port map clause maps the port names of the component declarations to the port names of the entities from the library Component declaration inv, port a is mapped to entity inv, port x of the actual entity. Similarly others This allow entities with completely different port names to be mapped into existing architechture

Mapping Library Entities


Similar to port mapping, entities from libraries can be mapped to components Easy to switch the entity used for each component in the architecture from one entity to another Allows the designer to map component instances to different entities Consider decoder eg., one 3 input AND is built using 2 input AND gates

The configuration maps first inverter, 3 input AND gate, A1 to entity struc_3 and other AND gates, to the behavioral entity and3

Generics in Configurations:
Generics are the parameters used to pass information into entities Typical applications are: value for rise and fall delay of output signals of the entity, temperature, voltage, etc.

Declaration is in entities, but value may be specified in number of places: 1. In generic declaration 2. In the architecture, in the component instantiation 3. In the component declaration 4. Configuration for the component Default values in generic declaration can be overridden by mapped values in architecture or configuration sections

A part of code:

Generic value specification in architecture


Partial code:

Generic values in configurations:


More flexible Allows late binding of all the methods for specifying the values for generics Allows back-annotation of path delay generics to occur in the configuration Partial code:

Architecture configuration:
Exists in the architecture and specifies the configurations of parts used in the architecture Separate configuration declaration is not needed Eg:

Das könnte Ihnen auch gefallen