aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/elab-vhdl_insts.adb9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb
index 96272af7c..d02691de0 100644
--- a/src/synth/elab-vhdl_insts.adb
+++ b/src/synth/elab-vhdl_insts.adb
@@ -699,9 +699,12 @@ package body Elab.Vhdl_Insts is
else
Arch := Get_Named_Entity (Arch);
end if;
- Sub_Config := Get_Library_Unit
- (Get_Default_Configuration_Declaration (Arch));
- Sub_Config := Get_Block_Configuration (Sub_Config);
+ Sub_Config := Get_Block_Configuration (Config);
+ if Sub_Config = Null_Node then
+ Sub_Config := Get_Library_Unit
+ (Get_Default_Configuration_Declaration (Arch));
+ Sub_Config := Get_Block_Configuration (Sub_Config);
+ end if;
Elab_Dependencies (Root_Instance, Get_Design_Unit (Ent));
Elab_Dependencies (Root_Instance, Get_Design_Unit (Arch));