Configuration Declaration |
LRM §1.3. |
A configuration is a construct that defines how the design hierarchy is linked together.
configuration configuration_name of entity_name is
[ configuration_declarations ]
for architecture_name
[ configuration_item ]
end for;
end [ configuration ] [ configuration_name ];
configuration_item = for instance_label : component_name
[ use_item
[ generic_map ]
[ port_map ]; ]
[ configuration_item ]
end for;
use_item = entity [ library_name. ] entity_name [ ( architecture_name ) ] |
configuration [ library_name. ] configuration_name
A configuration declaration defines how the design hierarchy is linked together during elaboration, by listing the entities and architectures used in place of each component instantiation within an architecture.
A simple configuration contains reference to only one architecture body. Hierarchical configurations allow to nest configurations. This mechanism allows binding component instantiations with the design entities down the hierarchy.
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.
-- an architecture of a microprocessor
architecture Structure of MicroProcessor is
component ALU port (...); end component;
component MUX port (...); end component;
component LATCH port (...); end component;
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;
-- a configuration of the microprocessor
library TTL, work;
use TTL.all;
use work.all;
configuration Cfg4 of MicroProcessor is
for Structure
for A1: ALU
use configuration TTL.SN74LS181;
end for;
for M1, M2, M3: MUX
use entity Multiplex4(behavior);
end for;
for all: LATCH
use entity Work.Latch;
end for;
end for;
end configuration Cfg4;
Architecture, Component, Configuration specification, Entity, Instantiation