diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/configuration.adb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vhdl/configuration.adb b/src/vhdl/configuration.adb index 1430eef..a72a254 100644 --- a/src/vhdl/configuration.adb +++ b/src/vhdl/configuration.adb @@ -303,9 +303,10 @@ package body Configuration is Arch := Get_Design_Unit (Arch); end if; Load_Design_Unit (Arch, Aspect); - Add_Design_Unit (Arch, Aspect); - -- Add the default configuration if required. + -- Add the default configuration if required. Must be done + -- before the architecture in case of recursive instantiation: + -- the configuration depends on the architecture. if Add_Default then Config := Get_Default_Configuration_Declaration (Get_Library_Unit (Arch)); @@ -313,6 +314,10 @@ package body Configuration is Add_Design_Unit (Config, Aspect); end if; end if; + + -- Otherwise, simply the architecture. + Add_Design_Unit (Arch, Aspect); + when Iir_Kind_Entity_Aspect_Configuration => Add_Design_Unit (Get_Design_Unit (Get_Configuration (Aspect)), Aspect); |