FPGA Center



CONFIGURATON

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 architecture_name
      for istantiate_label : component_ name
        use entity library_ name.entity_ name (arch_name);
      end for;
    -- other expressions
    end for;
end [configuration] [configuration_ name];

NOTE :

EXAMPLE 1 (INVERTER):

entity INVERTER is
            generic (PropTime : TIME := 5 ns);
            port ( IN1 : in BIT; OUT1 : out BIT);
end INVERTER;

architecture STRUCT_I of INVERTER is
begin
            OUT1 <= not IN1 after PropTime;
end STRUCT_I;

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 );
end component;

begin
  LH:INV_COMP generic map (10 ns) port map (S1,S2);   --  instantiation of INV_COMP
end STRUCT_T;

configuration CONFIG_TINV of TEST_INV is
for STRUCT_T
  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;
end for ;
end CONFIG_TINV;

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.


EXAMPLE 2:

for STRUCT
   for SPEECH_CPU: SPEECH
    use entity SP_LIB.DIG_REC(ISD)
    generic map (TimeRec => 20 sec);
            for ISD
               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.


EXAMPLE 3:


configuration Conf_Test of Test is
  for STRUCTURE_T
    for T_1 : DEC use configuration CONF_E;
    end for;
  end for;
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.


DETAILED EXPLANATION


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)

                                                                                                           

    

                                                                                                                                    

 

                                                                                                                                                                                                                                                                   

Home | Fpga | VHDL | VHDL Dictionary | Digital Design | Simulation | PCB | Examples | Contact Us
Copyright © 2010 - 2013 FPGAcenter. All Rights Reserved.