Home > VHDL > Advanced VHDL > Configuration Declaration
Configuration Declaration : The component instantiation indicates the entity part of the code. The association of entity and architecture is shown by the Configuration Declaration. Configuration Declaration is mainly shown in the declarative part. Therefore, the components are configured in the architecture. The generic map and port map clauses are also used in Configuration Declaration. The Syntax is :
configuration name_configuration of name_entity is
				for name_architecture
			for instance_label:name_component
				use entity library_name.name_entity(name_arch);
			end for;
		for clauses
		end for;
	end [configuration] [name_configuration]; 
    

Example :
	entity TESTER is
		generic (Delay_time : TIME := 5 ns);
		port ( IN1 : in BIT; OUT1 : out BIT);
	end TESTER;
	architecture STRUCT_TEST of TESTER is
	begin
		OUT1 <= not IN1 after Delay_time;
	end STRUCT_TEST;
	entity TEST_INV is end TEST_INV;
	architecture STRUCT_SAMPLE of TEST_INV is
	signal S1, S2 : BIT := '1';
	component INV_COMP is
		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);
	end STRUCT_SAMPLE;
	configuration CONFIG_TINV of TEST_INV is
	for STRUCT_SAMPLE -- indicates architecture body of TEST_INV
		for LH : INV_COMP
			use entity WORK.TESTER (STRUCT_TEST)
			generic map (Delay_time => TimeH)
			port map (IN1 => IN_A, OUT1 => OUT_A);
		end for;
	end for ;
	end CONFIG_TINV;