Configuration Specification

LRM §5.2.

A configuration specification is a construct that defines which entity and architecture is used in place of the instances of a single component during elaboration.

Syntax:

for instance_label : component_name
  use use_item
    [ generic_map ]
    [ port_map ];

use_item = entity [ library_name. ] entity_name [ ( architecture_name ) ] |
           configuration [ library_name. ] configuration_name 

Description:

Each component instantiation refers to some design entity (entity/architecture pair) and the association is specified by a configuration specification. Component specification appears in the declarative part of the unit, where the instances are used. This way components can be configured within the architecture which instances them without using a separate configuration declaration.

Configuration specifications are inflexible because changing the configuration requires editing the architecture containing the configuration. It is usually better to use separate configuration declarations.

When the ports and generics in the component declaration are not equal to their counterparts in the entity declaration, one can use an explicit notification on how the ports and generics in the entity should be bound to ports and generics of the component instance. The generic map and port map are used for this purpose.

Example:

architecture Structure of MicroProcessor is
  component ALU port (...); end component; 
  component MUX port (...); end component; 
  component LATCH port (...); end component; 

  for A1: ALU use configuration TTL.SN74LS181
    port map (Clk, Rst, A1, A2, Q);
  for M1, M2, M3: MUX use entity Multiplex4(behavior);
  for all: LATCH use entity Work.Latch;

begin 
  A1: ALU port map(...); 
  M1: MUX port map(...); 
  M2: MUX port map(...); 
  M3: MUX port map(...); 
  L1: LTACH port map(...); 
  L2: LATCH port map(...); 
end Structure;

Notes:

See also:

Architecture, Component, Configuration declaration, Entity, Instantiation