Configuration is a structure which determines how sub-components come together to constitute a complete design, the blocks are connected to each other.
configuration configuration_name of entity_name is
-- configuration declarations
for istantiate_label : component_ name
use entity library_ name.entity_ name (arch_name);
-- other expressions
end [configuration] [configuration_ name];
EXAMPLE 1 (INVERTER):
entity INVERTER is
generic (PropTime : TIME := 5 ns);
port ( IN1 : in BIT; OUT1 : out BIT);
architecture STRUCT_I of INVERTER is
OUT1 <= not IN1 after PropTime;
entity TEST_INV is end TEST_INV;
architecture STRUCT_T of TEST_INV is
signal S1, S2 : BIT := '1';
component INV_COMP is -- INV_COMP component declaration:
generic (TimeH : TIME);
port ( IN_A : in BIT; OUT_A : out BIT );
LH:INV_COMP generic map (10 ns) port map (S1,S2); -- instantiation of INV_COMP
configuration CONFIG_TINV of TEST_INV is
for LH : INV_COMP --Instantiation of INV_COMP┬á as LH
use entity WORK.INVERTER (STRUCT_I) -- generic map and port maps:
generic map (PropTime => TimeH)
port map (IN1 => IN_A, OUT1 => OUT_A);
end for ;
CONFIG_INV is a simple example form of a component declaration. You can see only one block configuration here. There is a declaration of component named INV_COMP in this block. Later this component is used with a label LH. The entity named INVERTER is associated with the component named INV_COMP.
for SPEECH_CPU: SPEECH
use entity SP_LIB.DIG_REC(ISD)
generic map (TimeRec => 20 sec);
for AD_CONV : ADC_1
use entity ANALOG_DEV.ADC;
end for; -- for AD_CONV
end for; -- for ISD
end for; -- for SPEECH_CPU
end for; -- for STRUCT
You can see the block configuration which indicates STRUCT architecture, is in the configuration declaration section. There is a configuration of a ┬ácomponent named SPEECH ┬áin the block configuration. IST block configuration defines the IST architecture. A label AD_CONV is used in this architecture. The entire block is hierarchically specified here.
configuration Conf_Test of Test is
for T_1 : DEC use configuration CONF_E;
end configuration Conf_Test;
You can see a configuration declaration which is associated with the EXAMPLE entity. DEC component is connected to EXAMPLE entity. CONF_E configuration is used while instantiating T_1 component in STRUCT_T architecture.
Each component instantiation indicates a entity/architecture pair (design entity). Component is declared in declaration part. It is first associated with the configuration name and then an entity.
Use, attribute and group can be used in declaration part. The main part of this section is the block configuration. This specifies which architecture is used with the design entity and which configuration element is used in configuration instantiation.
A simple configuration is referenced only in one architecture. (Example 1)
It is possible to combine component instantiations and entities by using hierarchical structures like nested block configurations. (Example 2)
Ports and generics in the configuration declaration must be compatible with the equivalents in entity declarations. In order to provide this compatibility, generic map and port map expressions are used. (Example 1)